Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

C | Arrays | Question 14

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Which of the following is true about arrays in C. 
 

(A)

For every type T, there can be an array of T.
 

(B)

For every type T except void and function type, there can be an array of T.
 

(C)

When an array is passed to a function, C compiler creates a copy of array.
 

(D)

2D arrays are stored in column major form
 


Answer: (B)

Explanation:

In C, we cannot have an array of void type and function types. 

For example, below program throws compiler error 
 

int main()
{
    void arr[100];
}

But we can have array of void pointers and function pointers. The below program works fine. 
 

int main()
{
    void *arr[100];
}

See examples of function pointers for details of array function pointers. 

 


Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Last Updated : 28 Jun, 2021
Like Article
Save Article
Similar Reads