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
0

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
0
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