C Objective Interview Questions on Arrays

These C Objective Interview Questions on Arrays post providing basic, intermediate and Hard level examples in C Arrays. The Practice of these examples makes you good in C programming.

Comment on an array of void data type:

  1. It can store any data-type
  2. It only stores element of the similar data type to the first element.
  3. It acquires the data type with the highest precision in it
  4. You cannot have an array of the void data type.

Answer :

Ans : 4, void array declaration is not allowed

What is the correct syntax to send a 3-dimensional array as a parameter? (Assuming declaration int a[5][4][3];)

  1. func(a);
  2. func(&a);
  3. func(*a);
  4. func(**a).

Answer :

Ans : 1

Applications of the multidimensional array are?

  1. Matrix addition
  2. Transpose of matrix
  3. Matrix-Multiplication
  4. All of above mentioned

Answer :

Ans : 3

What is an array?

  1. The Array is collection of different type of elements
  2. The array is a collection of dynamically allocated elements.
  3. The Array is collection of similar type of elements
  4. The Array is a collection of different data type placed next to each other.

Answer :

Ans : 3, Array holds only homogeneous data elements


Which of the following can also be used in place of num[i]?

  1. *(num+i)
  2. i[num]
  3. *(i+num)
  4. All of the above.

Answer :

Ans : 4

What is “ptr” in the below declaration?
int (*ptr) [4]

  1. “ptr” is an array of 4 integers
  2. “ptr” is a pointer to a function
  3. “ptr” is a pointer to an array of 4 integers.
  4. “ptr” is a pointer to an array of 4 functions.

Answer :

Ans : 3

data_type (*array_name)[size] describes….

  1. Array of pointers
  2. Pointer to array
  3. Pointer to function
  4. None of above.

Answer :

Ans : 2

 C Technical Interview Questions On Strings – Part1

Share this