Awesome q2a theme
0 votes
16 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 (14 points) | 16 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 (53 points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Jan 2020
  1. shashin

    1416 Points

  2. Vimal Patel

    377 Points

  3. Deepakk Poonia (Dee)

    350 Points

  4. Debapaul

    276 Points

  5. Satbir

    196 Points

  6. Pratyush Priyam Kuan

    160 Points

  7. tp21

    151 Points

  8. SuvasishDutta

    151 Points

  9. pranay562

    145 Points

  10. DukeThunders

    97 Points

Monthly Top User and those within 60% of his/her points will get a share of monthly revenue of GO subject to a minimum payout of Rs. 500. Current monthly budget for Top Users is Rs. 75.
3,138 questions
1,550 answers
9,401 comments
89,835 users