wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

C Programming Quiz-5

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

1. What will be the output of the following C code?

a)

Yes

b)

yes default

c)

Undefined behavior

d)

Compile time error

2.

What will be the output of following program?

a)

Hello

b)

OK

c)

Hello

OK

d)

Error

3.

What will be the output of the program?

a)

This is default

This is case 1

b)

This is case 3

This is default

c)

This is case 1

This is case 3

d)

This is default

4.

What is the output of C Program with switch statement or block?

a)

ANT KING PALACE

b)

KING PALACE

c)

PALACE

d)

Compiler error

5.

What will be the output of following program ?

a)

Hello

b)

ERROR

c)

No Output

d)

Garbage Value

6.

What would be the output of following program?

a)

One

b)

Two

c)

Three

d)

Error

7.

What is the output of C Program with switch statement or block?

a)

MySwitch

b)

No Output

c)

Compiler Error

d)

None of the above

8.

What is the output of C Program with switch statement or block.?

a)

APACHE HEROHONDA

b)

HEROHONDA

c)

No Output

d)

Compiler error

9.

The keyword break cannot be simply used within

a)

while statements

b)

for statement

c)

if else

d)

do while

10.

switch statement accept

a)

int

b)

char

c)

long

d)

all