Array of function pointers complex declaration
Filed under Adobe
Free read 1 of 3Apply the C spiral/right-left rule: start from the identifier, look right for brackets/parentheses, then left for types.
The question
Write a complex C declaration for an array of function pointers that return a pointer to a function, which in turn returns a pointer to a character array.
Constraints
- Must be valid standard C syntax.
- Must correctly parse nested function pointer return types.
Approach
Apply the C spiral/right-left rule: start from the identifier, look right for brackets/parentheses, then left for types.
Character array pointer: char (*func())[10]. Function returning that: char (*(*func())())[10]. Array of them: char (*(*arr[10]())())[10].
Show how using typedef makes complex function pointer declarations much more readable and maintainable in production code.
Tips
- What they are testing: Interviewers test your ability to read and write complex C declarations using the 'right-left' rule.
- Common mistake: Failing to correctly parenthesize the pointer and array identifiers, leading to compilation errors.
Related Adobe questions
Collected from public candidate posts and coding forums. Updated Nov 2026.