in Programming
421 views
0 votes
0 votes
What does this mean?

int *(*func())[]

According to me , it means that its an array of pointers to functions which returns pointers of type int. Am I correct?
in Programming
by
421 views

2 Answers

4 votes
4 votes
Best answer

For these type of complicated declarations, you can follow Clockwise/Spiral rule : http://c-faq.com/decl/spiral.anderson.html

By that rule, func is a function taking no arguments and returning a pointer to an array of pointers to int.

selected by

2 Comments

MS interview question 3...there is no option here matching your answer....can u please look again?
0
0
Yeah there is no correct option present there, there must have been some mistake. precedence of () operator is greater than * operator, so answer given above is correct.
0
0
1 vote
1 vote
func is a function returning pointers to array of pointers to int

Related questions