Multiple choice technology programming languages

int (*p(char *a))[10]

  1. p is a function that accepts an argument which is a pointer to a character and returns a pointer to a 10 element integer array

  2. p is a function that accepts an argument which is a pointer to a character array and returns an integer quantity

  3. p is a pointer to a function that accepts an argument which is a pointer to a character and returns an integer quantity

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The declaration int (p(char *a))[10] is complex: p is a function taking char and returning a pointer to an array of 10 ints. The syntax (p(char *a))[10] means p is a function (not a pointer), and it returns a pointer to [10]. Option B incorrectly says it returns an int. Option C describes a pointer-to-function, which would be written as int (*p)(char) without the [10].