Multiple Choice Questions
Question 1
Which of the following is the correct usage?
- int a[-40]
- int a[40]
- float a[0 - 40]
- None
Question 2
Which element is represented by a[10]?
- 10th
- 9th
- 11th
- None
Question 3
Cell numbers of a dimensional array are also known as:
- packets
- blocks
- subscripts
- compartments
Question 4
A dimensional array is also known as:
- subscripted variable
- actual variable
- compound variable
- none
Question 5
An array element can be accessed through:
- dots
- element name
- index number
- none
Question 6
Indicate the error message which
displays, if the following statement is executed :
int a[5] =
{28,32,45,68,12};
- Insufficient cells
- Array index out of bounds
- Elements exceeding cells
- None
Question 7
The following statement :
int code[ ]=
{25,37,38,42};
- assigns 37 to code[1]
- assigns 25 to code[1]
- assigns 38 to code[3]
- assigns 42 to code[0]
Question 8
The elements of array[50] are numbered:
- from 1 to 50
- from 0 to 49
- from 1 to 51
- none
Question 9
Which of the following function finds the size of array
char m[] = {'R', 'A', 'J', 'E', 'N', 'D', 'R', 'A' };?
- m.sizeof (a)
- m.elementsof (m)
- m.length
- None
Question 10
A Single Dimensional array contains N elements. What will be
the last subscript?
- N-1
- N
- N+1
- None
No comments:
Post a Comment