What is the meaning of the following declaration in C language? int (*d)[10];

2017

What is the meaning of the following declaration in C language? int (*d)[10];

Answer: B. d is a pointer to an array of 10 integersIn the declaration int (*d)[10]; the parentheses make d a pointer first, and [10] applies to the array type. So d is a pointer to an array of 10 integers.

  1. A.

    It will result in compile time error

  2. B.

    d is a pointer to an array of 10 integers

  3. C.

    d is pointer to integer array

  4. D.

    d is an array of 10 integer pointers

Attempted by 206 students.

Show answer & explanation

Correct answer: B

In the declaration int (*d)[10]; the parentheses make d a pointer first, and [10] applies to the array type. So d is a pointer to an array of 10 integers.

Explore the full course: Isro

Loading lesson…