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:
- It can store any data-type
- It only stores element of the similar data type to the first element.
- It acquires the data type with the highest precision in it
- You cannot have an array of the void data type.
What is the correct syntax to send a 3-dimensional array as a parameter? (Assuming declaration int a;)
Applications of the multidimensional array are?
- Matrix addition
- Transpose of matrix
- All of above mentioned
What is an array?
- The Array is collection of different type of elements
- The array is a collection of dynamically allocated elements.
- The Array is collection of similar type of elements
- The Array is a collection of different data type placed next to each other.
Which of the following can also be used in place of num[i]?
- All of the above.
What is “ptr” in the below declaration?
int (*ptr) 
- “ptr” is an array of 4 integers
- “ptr” is a pointer to a function
- “ptr” is a pointer to an array of 4 integers.
- “ptr” is a pointer to an array of 4 functions.
data_type (*array_name)[size] describes….
- Array of pointers
- Pointer to array
- Pointer to function
- None of above.