C Programming - Complicated Declarations - Discussion
Discussion Forum : Complicated Declarations - General Questions (Q.No. 12)
12.
What do the following declaration signify?
int (*ptr)[30];
Discussion:
14 comments Page 1 of 2.
Harish jangra said:
2 decades ago
i think 'c' is the correct answer to this problem.
can anyone explain me how 'a' is the correct answer?
can anyone explain me how 'a' is the correct answer?
Ram mohan said:
2 decades ago
*ptr[30] is a array of 30 pointers but
here mentioned that (*ptr)[30]
here mentioned that (*ptr)[30]
Shireesh said:
1 decade ago
In answer A take 30 integers instead of integer pointers, then Ans is A.
Vinay said:
1 decade ago
ptr is a pointer to an array of 30 integers.
Satyakala said:
1 decade ago
Here (*ptr)[30] means it is an pointer to array of 30 integers not 30 integer pointers because it is not array of pointers.
Sara said:
1 decade ago
satya is rite..
Nitin said:
1 decade ago
ptr is a pointer to an array of 30 integers.
Vikas Sharma said:
1 decade ago
It should be "pointer to an array of 30 integers"
Arjun Prasad said:
1 decade ago
In answer A:- it should be 30 "integers" instead of "integer pointers", then A correct.
Anil said:
1 decade ago
int (*ptr)[30]=pointer to array of 30 integers;
int *ptr[30]=ptr is an array of 30 integer pointer
int *ptr[30]=ptr is an array of 30 integer pointer
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers