ExamVeda
Login
Home
This question belongs to C Program Arrays And Strings
Arrays and Strings
?

What does the following declaration mean?
int (*ptr)[10];

Answer & Solution
Correct Answer: Option B
The declaration int (*ptr)[10]; means that ptr is a pointer to an array of 10 integers.

Here's the breakdown:

int specifies the type of elements in the array (integers).
(*ptr) indicates that ptr is a pointer.
[10] specifies that the pointer points to an array of 10 integers.

Thus, ptr is not an array of pointers, nor an array of integers, but a pointer to an array of integers with a size of 10.
Examveda
Question posted by Examveda
Community

Join the Discussion

3 Comments
SHEHAM FAZAL
SHEHAM FAZAL 4 years ago
ptr it is pointer itself and is point to array 10 integer.....
Narendra B
Narendra B 6 years ago
Explain?
Pooja Kangula
Pooja Kangula 6 years ago
Explain