Can someone explain me this code ? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite

Can someone explain me this code ?

#include<stdio.h> void foo(); int main() { void (*bar)() = foo; (*bar)(); bar(); return 0; } void foo(){ printf("SoloLearn "); } // Output --- SoloLearn SoloLearn

26th May 2020, 11:31 AM
Ajay Kumar Maurya
Ajay Kumar Maurya - avatar
1 Réponse
Before main there is a definition of foo function. In main u create function pointer and call function by it twice
26th May 2020, 12:00 PM
Max Charlington
Max Charlington - avatar