C Programming - Arrays - Discussion
Discussion Forum : Arrays - General Questions (Q.No. 2)
2.
What does the following declaration mean?
int (*ptr)[10];
int (*ptr)[10];
Discussion:
65 comments Page 7 of 7.
Vijayalaxmi said:
2 decades ago
Here we have to see the priority () have highest priority.
So int (*ptr)[] read it as pointer to array of integers.
If () is not there then int *ptr[] start with [] and it means array of pointers of type integers.
So int (*ptr)[] read it as pointer to array of integers.
If () is not there then int *ptr[] start with [] and it means array of pointers of type integers.
Ravikumar said:
2 decades ago
We can use a * sometimes to declare the array both are same that is way answer is b.
Neha said:
2 decades ago
Can you explain me the concept?
Chitra said:
2 decades ago
*ptr is a pointer and [10] is array is array declaration.
Sagar Said said:
2 decades ago
Can you explain me the concept
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers