0% found this document useful (0 votes)
43 views15 pages

An Array Is A Collection of

The document contains a series of multiple-choice questions related to arrays in programming, covering topics such as data types, memory storage, initialization, and accessing elements. Each question provides four answer options, testing knowledge on array characteristics and behaviors. The questions are designed to assess understanding of arrays in a programming context.

Uploaded by

saikatpaulprint
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)
43 views15 pages

An Array Is A Collection of

The document contains a series of multiple-choice questions related to arrays in programming, covering topics such as data types, memory storage, initialization, and accessing elements. Each question provides four answer options, testing knowledge on array characteristics and behaviors. The questions are designed to assess understanding of arrays in a programming context.

Uploaded by

saikatpaulprint
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/ 15

Question 1

An array is a collection of

1. Different data types


2. Same data types
3. Both 1 and 2
4. None of these
Question 2

An array elements are stored in

1. Scattered memory locations


2. Sequential memory locations
3. Both 1 and 2
4. None of these
Question 3

A character array always ends with

1. Null (‘\0’ ) character


2. Question mark (?)
3. Full stop (.)
4. None of these
Question 4

If you declare array without static the elements it


will be set to

1. A null value
2. Zero
3. Garbage value
4. None of these
Question 5

Array cannot be initialized if they are

1. Automatic
2. external
3. static
4. None of the above
Question 6

All the elements in the array must be

1. initialized
2. defined
3. Both 1 and 2
4. None of the above
Question 7

What will be the output

1. 2 3 4 5 6
2. 1 2 3 4 5
3. 1 1 1 1 1 1
4. 1 2 2 2 2 2
Question 8

How many integer values can the array N[5][5]


store?

1. 10
2. 16
3. 24
4. 25
Question 9

What index value should be used to access the last


element of the integer array N[10]?

1. 10
2. 9
3. 11
4. None of the above
Question 10

The process of creating a fixed sized array by


allocating memory space at compile time is called

1. Static memory allocation


2. Run time memory allocation
3. Dynamic memory allocation
4. None of the above
Question 11

An array N[3] ={1,2,3} has been declared and


initialized in C program. What will be the output of
the printf (“%d”, N[3]);

1. 3
2. 2
3. 4
4. Garbage value
Question 12

It is required to store the names of five students .


Which of the following array declaration statements
can be used for this?

1. char student [4][25]


2. char student [5][25]
3. char student [25][5]
4. char student [25][4]
Question 13

An array char arr[5][20] has been declared. What


will be the output of the following statement ?
printf(“%d”, sizeof(arr));

1. 100
2. 200
3. 400
4. 800
Question 14

The variable used as a subscript in an array is


popularly known as ------------ variable.

1. control
2. index
3. constant
4. none of the above
Question 15

An array can be initialized

1. Compile time
2. Run time
3. Both 1 and 2
4. None of the above

You might also like