Question:An array is defined with the following statement in a file, file1.c
int a[ ] = { 1, 2, 3, 4, 5, 6 };
In another file, file2.c, the following code snippet is written to use the array a:
extern int a[];
int size = sizeof(a);
What is wrong with the above code snippet? 

A The size of the operator cannot be applied to an array 

B The size of the operator cannot be applied to an array 

C There is nothing wrong with the code snippet. The value of the size will be 7 

D An extern array of unspecified size is an incomplete type. The size of the operator during compile time is unable to learn the size of an array that is defined in another file 

E None 

+ Answer
+ Report
Total Preview: 514

Copyright © 2024. Powered by Intellect Software Ltd