0
Which program p1 or p2 have error and why ? Plz.. explain ?
P1 int main() { int (*ptr)(int) = fun ; (*ptr)(3); return; } int fun(int n) { for(;n>0;n--) Printf("GeeksQuiz "); return; } P2 int main () { void demo (); void (*fun)(); fun=demo; (*fun)(); fun(); return 0; } void demo() { Printf("GeeksQuiz "); }
1 Antwort
0
In P2 is
fun = demo
Or
fun =&demo