In C++ array indices – subscript values – must be_____. A)an integer type that i
ID: 3616815 • Letter: I
Question
In C++ array indices – subscript values – must be_____. A)an integer type that is non-negativeB)negative
C)positive
D)less than or equal to the declared size of thearray
2. Given the array declaration, int a[20], the first element iswritten as _____. A)a[1]
B)a[0]
C)a
D)a[20] In C++ array indices – subscript values – must be_____. A)an integer type that is non-negative
B)negative
C)positive
D)less than or equal to the declared size of thearray
In C++ array indices – subscript values – must be_____. 2. Given the array declaration, int a[20], the first element iswritten as _____. A)a[1]
B)a[0]
C)a
D)a[20] 2. Given the array declaration, int a[20], the first element iswritten as _____. A)a[1]
B)a[0]
C)a
D)a[20] Given the array declaration, int a[20], the first element iswritten as _____.
Explanation / Answer
1) A is correct since array indices start from 0 and continues tillSIZE-1 where SIZE is the number of elements in array B is wrong since array indices cannot be negative ..they can befrom 0 to SIZE-1 (which ara either zero or positive] C is wrong ...since array index can be zero which is not positivenumber D is wrong since there will be no element in an array with index =SIZE (where SIZE is the size of an array] 2) first element will be written as a[0]...since array indices startwith zero