Contents

Definition and Initialization of Array


Which of the following array can be represented as a single row of contiguous memory locations?
a) linear array                          
b) one-dimensional array
c) both a & b                           
d) two-dimensional array

c

Which of the following is the correct format for declaration of array?
a) data type name[array];         
b) data type name[size];
c) name data type[size];
d) all of these

b

Which of the following bracket is used for size in array?
a) curly bracket {}                   
b) square bracket []
c) small bracket ()        
d) none of these

b

What is the initial index used for array?
a) 0                                         
b) 1
c) both a & b               
d) none of these

a

What is the correct format for array initialization?
a) int A [5] = {1,2,3,4,5};         
b) int A [5] = [1,2,3,4,5];
c) int A [5] = (1,2,3,4,5)
d) all of these

a