The Gateway to Computer Science Excellence
0 votes
191 views
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 Junior (657 points) | 191 views

2 Answers

+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.

by Boss (11.3k points)
selected by
0
MS interview question 3...there is no option here matching your answer....can u please look again?
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.
+1 vote
func is a function returning pointers to array of pointers to int
by Active (3.2k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,741 questions
57,251 answers
198,056 comments
104,681 users