59 59 votes What does the following C-statement declare? int (*f) (int * ); A function that takes an integer pointer as argument and returns an integer A function that takes an integer as argument and returns an integer pointer A pointer to a function that takes an integer pointer as argument and returns an integer A function that takes an integer pointer as argument and returns a function pointer Programming in C gatecse-2005 programming programming-in-c pointers easy isro2017 + – Kathleen 28.3k views answer comment Share Follow Print See all 2 Comments 2 2 Comments reply KUSHAGRA गुप्ता commented Dec 26, 2019 reply Follow flag https://www.youtube.com/watch?v=LPABbqfElA8&list=PLsFENPUZBqipuTJXgm7xAOR0UnY_8OY07&index=31 28 28 replyShare shashankrustagi commented Jan 16, 2021 reply Follow flag B,D are incorrect as they are not returning INT A is incorrect because it is not a function, LOL, it is a function pointer hence C 6 6 replyShare Please log in or register to add a comment.
Best answer 81 81 votes A function that takes an integer pointer as argument and returns an integer $\Rightarrow int \ f (int *)$ A function that takes an integer as argument and returns an integer pointer $\Rightarrow int * f (int )$ A pointer to a function that takes an integer pointer as argument and returns an integer $\Rightarrow$ int (*f) (int * ); So, answer is C. Akash Kanase answered Nov 28, 2015 • edited Jun 15, 2018 by Milicevic3306 Akash Kanase comment Share Follow See all 18 Comments 18 18 Comments reply Show 15 previous comments Kiyoshi commented Jun 23, 2022 i edited by Kiyoshi Jun 23, 2022 reply Follow flag A function that takes an integer pointer as argument and returns a pointer to a function that takes no arguments and returns integer.f(int*)A function that takes an integer pointer as argument and returns a pointer to a function that takes no arguments and returns integer.int (*f(int*))() 2 2 replyShare Abhrajyoti00 commented Oct 27, 2022 reply Follow flag Thanks @Ashish Subscription for the wonderful "Brahmastra"More on function pointers : Lecture 08 - Function Pointers (cmu.edu) 2 2 replyShare rhl commented Aug 26, 2025 reply Follow flag thanks @Abhrajyoti00 , good read on function pointers. 0 0 replyShare Please log in or register to add a comment.
7 7 votes Answer is option C... This is the proptotype to declare a pointer to a function anchitjindal07 answered May 7, 2017 anchitjindal07 comment Share Follow 0 reply Please log in or register to add a comment.
3 3 votes http://www.geeksforgeeks.org/complicated-declarations-in-c/ Good information to go through Answer C Regina Phalange answered Apr 8, 2017 Regina Phalange comment Share Follow 0 reply Please log in or register to add a comment.
3 3 votes By clockwise spiral rule, answer is C A very good read to read function description http://c-faq.com/decl/spiral.anderson.html Rohit Gupta 8 answered Dec 12, 2017 Rohit Gupta 8 comment Share Follow 0 reply Please log in or register to add a comment.
1 1 vote The answer is C. Detailed video explanation: https://youtu.be/0an69DcHsT0?si=-dG4A4nFKY895hx_ gopal_gate answered Sep 2, 2023 gopal_gate comment Share Follow See 1 comment 1 1 comment reply Luke Nebula commented Oct 28, 2024 reply Follow flag Indeed Useful , thanks 0 0 replyShare Please log in or register to add a comment.
1 1 vote Small Trick For How to Read Start at the variable name.Go right (but respect parentheses).If you can’t go right, go left.Keep spiraling out until you’ve read the whole declaration. nirmal_aravind answered Sep 20, 2025 nirmal_aravind comment Share Follow 0 reply Please log in or register to add a comment.