38 votes 38 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 asked Sep 22, 2014 • retagged Dec 9, 2022 by Lakshman Bhaiya Kathleen 20.8k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply KUSHAGRA गुप्ता commented Dec 26, 2019 reply Follow Share https://www.youtube.com/watch?v=LPABbqfElA8&list=PLsFENPUZBqipuTJXgm7xAOR0UnY_8OY07&index=31 22 votes 22 votes shashankrustagi commented Jan 16, 2021 reply Follow Share 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 3 votes 3 votes Please log in or register to add a comment.
Best answer 57 votes 57 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 17 Comments See all 17 17 Comments reply Show 14 previous comments tirth_patel commented Nov 24, 2021 reply Follow Share Ashish bhai thanks a lot for this “Brahmastra” ☺ 1 votes 1 votes Kiyoshi commented Jun 23, 2022 i edited by Kiyoshi Jun 23, 2022 reply Follow Share 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*))() 1 votes 1 votes Abhrajyoti00 commented Oct 27, 2022 reply Follow Share Thanks @Ashish Subscription for the wonderful "Brahmastra"More on function pointers : Lecture 08 - Function Pointers (cmu.edu) 0 votes 0 votes Please log in or register to add a comment.
7 votes 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 See all 0 reply Please log in or register to add a comment.
3 votes 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 See all 0 reply Please log in or register to add a comment.
3 votes 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 See all 0 reply Please log in or register to add a comment.