[go: up one dir, main page]

0% found this document useful (0 votes)
1K views3 pages

MCQ On Array For ICSE Class-10

Uploaded by

ishanbrave2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views3 pages

MCQ On Array For ICSE Class-10

Uploaded by

ishanbrave2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

124 K – BLOCK, KIDWAI NAGAR (in Side lane of Balaji Park), Kanpur.

by : Vinod Kharay(MCA ,M.Sc., B.Ed.)


phone : 9336061496

CLASS –X
Arrays
Question 1:
Which of the following is the correct usage?
1. int a[-40]
2. int a[40]
3. float a[0 - 40]
4. None
Answer int a[40]
Reason — The declaration of array int a[40] follows correct syntax.

Question 2:
Which element is represented by a[10]?
1. 10th
2. 9th
3. 11th
4. None
Answer 11th
Reason — Array indexes start from 0. So, a[10] refers to the 11 th element of the array.

Question 3:
Cell numbers of a dimensional array are also known as:
1. packets
2. blocks
3. subscripts
4. compartments
Answer subscripts
Reason — Cell numbers of a dimensional array are also known as subscripts.

Question 4:
A dimensional array is also known as:
1. subscripted variable
2. actual variable
3. compound variable
4. none
Answer subscripted variable
Reason — A dimensional array is also known as subscripted variable because each element
of the array is represented by using a common variable name along with a single subscript.

Question 5:
An array element can be accessed through:
1. dots
124 K – BLOCK, KIDWAI NAGAR (in Side lane of Balaji Park), Kanpur.

by : Vinod Kharay(MCA ,M.Sc., B.Ed.)


phone : 9336061496

2. element name
3. index number
4. none
Answer index number
Reason — An array element can be accessed through the index number.

Question 6:
Indicate the error message which displays, if the following statement is executed :
int a[5] = {28,32,45,68,12};
1. Insufficient cells
2. Array index out of bounds
3. Elements exceeding cells
4. None
Answer None
Reason — The statement int a[5] = {28,32,45,68,12}; is perfectly correct and will not
generate any error message.

Question 7:
The following statement :
int code[ ]= {25,37,38,42};
1. assigns 37 to code[1]
2. assigns 25 to code[1]
3. assigns 38 to code[3]
4. assigns 42 to code[0]
Answer assigns 37 to code[1]
Reason — The statement int code[ ]= {25,37,38,42}; assigns 37 to code[1] as the array index
begins from 0. So the second value (37) will be assigned to code[1].

Question 8:
The elements of array[50] are numbered:
1. from 1 to 50
2. from 0 to 49
3. from 1 to 51
4. none
Answer from 0 to 49
Reason — The elements of array[50] are numbered from 0 to 49 as the array index begins
from 0.

Question 9
Which of the following function finds the size of array
char m[] = {'R', 'A', 'J', 'E', 'N', 'D', 'R', 'A' };?
1. m.sizeof (a)
2. m.elementsof (m)
124 K – BLOCK, KIDWAI NAGAR (in Side lane of Balaji Park), Kanpur.

by : Vinod Kharay(MCA ,M.Sc., B.Ed.)


phone : 9336061496

3. m.length
4. None
Answer m.length
Reason — m.length will find the size of array m[].

Question 10
A Single Dimensional array contains N elements. What will be the last subscript?
1. N-1
2. N
3. N+1
4. None
Answer N-1
Reason — The array subscripts range from 0 to (n-1), where n is the number of elements in
the array.

Fill in the blanks


Question 11:
Each element of a single dimensional array is accessed using variable along
with subscript enclosed within square bracket.

Question 12:
A double dimensional array uses two types of indices.

Question 13:
To access the elements in reverse order, the single dimensional array is traversed starting
with last index.

Question 14:
Complete the following statement:
int a[ ] = new int a[15]

Question 15:
The last index of a single dimensional array will be 7, if it is declared to store 8 elements.

You might also like