Examveda
Examveda

Which of the following statements are correct about an array?
1. The array int num[26]; can store 26 elements.
2. The expression num[1] designates the very first element in the array.
3. It is necessary to initialize the array at the time of declaration.
4. The declaration num[SIZE] is allowed if SIZE is a macro.

A. 1

B. 1, 4

C. 2, 3

D. 2, 4

E. None of these

Answer: Option B

Solution(By Examveda Team)

1. The array int num[26]; can store 26 elements. This statement is true.
2. The expression num[1] designates the very first element in the array. This statement is false, because it designates the second element of the array.
3. It is necessary to initialize the array at the time of declaration. This statement is false.
4. The declaration num[SIZE] is allowed if SIZE is a macro. This statement is true, because the MACRO just replaces the symbol SIZE with given value.
Hence the statements '1' and '4' are correct statements.


This Question Belongs to C Program >> Arrays And Strings

Join The Discussion

Comments ( 1 )

  1. Abinaya Perumal
    Abinaya Perumal :
    6 years ago

    I think answer 1 is wrong because array range from 0 to size-1.correct answer is 4 only

Related Questions on Arrays and Strings