Awesome q2a theme
0 votes
12 views
main ( )
{
int abc ( );
abc ( );
(*abc) ( );
}
int abc ( )
{ printf (“come”);}


(a) results in a compilation error (b) prints come come
(c) results in a run-time error (d) prints come
in Programming by (120 points) | 12 views
0
What does the line (*abc)() mean in the above code snippet?
0
The function is declared incorrectly. abc should return an int, it’s not returning anything.
0
option b it will print come come

1 Answer

0 votes

int abc() is just a declaration of a function. 

abc() is function calling so it would print come.

(*abc)() is a function pointer to abc(). So it would print come again.

To understand what is a function pointer read this https://www.geeksforgeeks.org/function-pointer-in-c/

by (178 points)
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
932 questions
596 answers
1,885 comments
81,474 users