CSE MCQ
Strictly speaking C supports 1-dimensional arrays only
An array element may be an array by itself
Array elements need not occupy contiguous memory locations
Both (a) and (b)
It is a collection of items that share a common name
It is a collection of items that share a common name and occupy consecutive memory location
It is a collection of items of the same type and storage class that share a common name and occupy consecutive memory locations
None of the above
assigns 3 to a [5]
assigns 4 to a [5]
assigns 4 to a [4]
what is assigned is compiler-dependent
true
false
C's asset
C's shortcoming
will not compile successfully
results in run-time error
prints garbage
none of the above
both the subscripts may be left empty
the first (row) subscript may be left empty
the first subscript must be left empty
both the subscripts must be left empty
when initialization is a part of definition
when it is a declaration
when it is a formal parameter and an actual argument
All of the above
3
4
5
compiler dependent
val[0 ][ 3]
val[0][4]
val[1][1]
call by value
call by value-result
call by reference
none of these
results in bus error
results in segmentation violation error
with empty brackets
with its size
alone
15 bytes
10 bytes
50 bytes
30 bytes
num [9] is the last element of the array num
The value of num [ 8] is 3
The value of num [ 3 ] is 3
automatic
external
static
either automatic or external depending on the place of occurrence
5x6 matrix with 9 non-zero entries
5x6 matrix with 10 non-zero entries
Efficient in accesing an entry
Efficient if the sparse matrix is a band matrix
Symbol table
Activation record
Dope vector
n-[log₂n]-2
n+[log₂n-2]
log₂n
Type COLOGNE:(LIME,PINE,MUSK,MENTHOL); var a:array[COLOGNE]of REAL;
var a:array[REAL]of REAL;
var a:array['A'..'Z']of REAL;
var a:array[BOOLEAN]of REAL;
0
1
2