Log In
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 222 views

2 Answers

4 votes
Best answer

For these type of complicated declarations, you can follow Clockwise/Spiral rule :

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

selected by
MS interview question 3...there is no option here matching your answer....can u please look again?
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

Related questions

3 votes
4 answers
259 views int main() { int a = 10; int *b = &a; scanf("%d",b); printf("%d",a+50); } What will be the Output of the following code if input given is $25$ ?
asked May 22, 2019 in Programming Manoj Kumar Pandey 259 views
1 vote
1 answer
$1)$ How to access array element with array of pointers? By pointer to an array we can access like this $(*a)[0]$,$(*a)[22]$, .. like this right? but how with array of pointer? $2)$Check these three codes , one of them use array and one of them use array of pointer, and 3rd one ... **ptr[12]; int main(void) { if(*(ptr+5)==*(ptr+3)){ printf("Equal"); } else{ printf("Not Equal"); } return 0; }
asked May 5, 2019 in Programming srestha 210 views
2 votes
1 answer
#include <stdio.h> char *c[] = {"GatsQuiz", "MCQ", "TEST", "QUIZ"}; char **cp[] = {c+3, c+2, c+1, c}; char ***cpp = cp; int main() { printf("%s ", **++cpp); printf("%s ", *--*++cpp+3); printf("%s ", *cpp[-2]+3); printf("%s ", cpp[-1][-1]+1); return 0; } what is the output of this program? Please explain with reasons.
asked Feb 15, 2019 in Programming Somdatta Sen 109 views
0 votes
2 answers
For this statement->printf ("%s",*--*++cpp+3); What will be the order of precedence according to pointer arithmetic?
asked Feb 10, 2019 in Programming Somdatta Sen 120 views