What will be output of following C code (after linking to source file having definition of ary1)?

What will be the output of the following C code (after linking to source file having definition of ary1)?

What will be the output of the following C code (after linking to source file having definition of ary1)? mcq and its answer is provided on this page.

What will be the output of the following C code (after linking to source file having definition of ary1)?

Que. What will be the output of the following C code (after linking to source file having definition of ary1)?
a. #include int main() { extern ary1[]; printf("%d\n", ary1[0]); }
b. a) Value of ary1[0];
c. b) Compile time error due to multiple definition
d. c) Compile time error because size of array is not provided
e. d) Compile time error because datatype of array is not provided
Answer: d
Explanation : None.


Comments