0% found this document useful (0 votes)
4 views

Std 10th Ch 15 Arrays

The document contains a quiz on arrays in C programming, covering topics such as accessing array elements, output of program segments, and definitions of arrays. It includes multiple choice questions about array behavior, indexing, and characteristics. The questions test knowledge of array limits, output formatting, and the nature of arrays.

Uploaded by

krishivvyas30
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Std 10th Ch 15 Arrays

The document contains a quiz on arrays in C programming, covering topics such as accessing array elements, output of program segments, and definitions of arrays. It includes multiple choice questions about array behavior, indexing, and characteristics. The questions test knowledge of array limits, output formatting, and the nature of arrays.

Uploaded by

krishivvyas30
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Chapter no.

15 Arrays

1. What happens if a C program tries to access a value from an array element whose subscript
exceeds the size of array?
a) Element will be set to zero
b) The compiler would report an error
c) The program may crash or gives garbage data
d) The array size increase automatically
2. What will be the output of following program segment?
Int num[5] = {1,2,3,4,5};
Int i, j;
i = num[1];
j = num[2];
printf(“%d, %d, %d”, I, j, num[0]);

a) 1,2,3 b) 2,3,1 c) 1,2,0 d) 3,4,5


3. What will be the output of following program segment?
Int num[5] = {1,2,3};
printf(“%d, %d”, num[0] num[3]);
a) 1,2 b) 1,0 c) 1,3 d) 2,3
4. Tick the odd one out?
a) array b) while c) if else d) input
5. What is the index of first element of an array in C?
a) 0 b) 1 c) -1 d) None
6. What is an array?
a) A collection of elements of the same data type stored at non-contiguous memory location.
b) A collection of elements of the same data type stored at contiguous memory location.
c) A collection of elements of different data types stored at contiguous memory locations.
d) A collection of elements of different data types stored at non-contiguous memory
locations.

You might also like