C Programming - Arrays - Discussion

Discussion Forum : Arrays - General Questions (Q.No. 2)
2.
What does the following declaration mean?
int (*ptr)[10];
ptr is array of pointers to 10 integers
ptr is a pointer to an array of 10 integers
ptr is an array of 10 integers
ptr is an pointer to array
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
64 comments Page 5 of 7.

Siva said:   6 years ago
ptr is a pointer variable that can store an array of integer values(i.e. 10 integer values).
(1)

Kuldeep chaudhary said:   1 decade ago
pointer of array is declared as type (*p)[14]
array of pointers is declared as type *p[14]

Nitin Goyal said:   1 decade ago
Here ptr is the pointer for the memory location occupied by array having 10 elements.

Ravikumar said:   1 decade ago
We can use a * sometimes to declare the array both are same that is way answer is b.

Sornalatha said:   1 decade ago
(*ptr) is a pointer. It point out the array of value [10]. So option B is correct.

Raghu said:   1 decade ago
Any one can explin main difference between a[] & *ptr[] with an example.

Sid... said:   1 decade ago
*ptr (10) means.

It is a pointer type aaray whch have 10 integers in it.

Nawinraj said:   7 years ago
Pointer is only pointer to assign array functionto 10 integers.

Chitra said:   1 decade ago
*ptr is a pointer and [10] is array is array declaration.

Avijit said:   1 decade ago
ptr is a pointer,which is a type of int.ptr is an array.


Post your comments here:

Your comments will be displayed after verification.