Find Output Array Questions
Print Out Correct Questions
Yes/No Array Questions
------------------------------------------------------------------------------------------------
1.
What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array?
A. The element will be set to 0.
B. The compiler would report an error.
C. The program may crash if some important data gets overwritten.
D. The array size would appropriately grow.
Answer: C
Explanation:
If the index of the array size is exceeded, the program will crash. Hence "option c" is the correct answer. But the modern compilers will take care of this kind of errors.
--------------------------------------------------------------------------------------------------------
2.
What does the following declaration mean?
| ||