wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Day5_Arrays

Total questions: 12

Worksheet time: 12mins

Name
Class
Date
1.

What is an Array in C language.?

a)

A group of elements of same data type.

b)

An array contains more than one element

c)

Array elements are stored in memory in continuous or contiguous locations.

d)

All the above.

2.

What are the Types of Arrays.?

a)

int, long, float, double

b)

struct, enum

c)

char

d)

All the above

3.
a)

3, 2, 15

b)

2, 3, 20

c)

2, 1, 15

d)

1, 2, 5

4.

a)

5

b)

6

c)

9

d)

Compiler error

5.

An array elements are always stored in ________ memory locations.

a)

Sequential

b)

Random

c)

Sequential and Random

d)

None of the above

6.

Let x be an array. Which of the following operations are illegal?

I. ++x

II. x+1

III. x++

IV. x*2

a)

I and II

b)

I, II and III

c)

II and III

d)

I, III and IV

7.

What is the maximum number of dimensions an array in C may have?

a)

2

b)

8

c)

20

d)

Theoretically no limit. It depends on memory size and compilers.

8.
a)

Garbage value

b)

5

c)

6

d)

0

9.

a)

Equal

b)

Unequal

c)

Error

d)

None of these.

10.

a)

0 0

b)

Garbage value 0

c)

0 Garbage value

d)

Garbage value Garbage value

11.

a)

65474, 65488

b)

65480, 65496

c)

65474, 65476

d)

None of these

12.

a)

1

b)

0

c)

10

d)

6