Question:

What is the meaning of the following declaration in C? $$ \text{int } *(\text{*p})(\text{int } (*a)[]); $$

Show Hint

Function pointers in C can be complex, so break down the declaration step by step to understand it better.
Updated On: May 3, 2025
  • Represents a pointer to a function that accepts a pointer to an array of integers as an argument and returns a pointer to an integer.
  • Represents a function that accepts a pointer to an array of integers as an argument and returns a pointer to an integer.
  • Represents a pointer to a function that accepts a function to an array of integers as an argument and returns a pointer to an integer.
  • Represents a pointer to a function that accepts a pointer to function to an array of integers as an argument and returns a pointer to an integer.
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

The declaration \( \text{int } (\text{p})(\text{int } (a)[]) \) describes a function pointer:
- \( p \) is a pointer to a function.
- The function accepts \( a \), a pointer to an array of integers, as an argument.
- The function returns a pointer to an integer.
Thus, the correct option is \( \text{Represents a pointer to a function that accepts a pointer to an array of integers as an argument and returns a pointer to an integer.} \).
Was this answer helpful?
0
0

Top Questions on Programming in C

View More Questions