Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Unit -2 : Assignment 1

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Loops in C Language are implemented using.?

a)

While Block

b)

For Block

c)

Do While Block

d)

All the above

2.

Which loop is faster in C Language, for, while or Do While.?

a)

for

b)

while

c)

do while

d)

All work at same speed

3.

Choose correct C while loop syntax.

a)

while(condition)

{

//statements

}

b)

{

//statements

}while(condition)

c)

while(condition);

{

//statements

}

d)

while()

{

if(condition)

{

//statements

}

}

4.

Choose a correct C Statement regarding for loop.

a)

for loop works exactly first time

b)

for loop works infinite number of times

c)

Compiler error

d)

None of the above

5.

If block always need to be assoicated with a else block?

a)

True

b)

False

6.

The conditional operator are also known as

a)

Relational operator

b)

Binary operator

c)

Ternary operator

d)

Arithematic operator

7.

The continue statement cannot be used with ________

a)

for

b)

while

c)

do while

d)

switch

8.

This Loop tests the condition after having executed the Statements within the Loop.

a)

while

b)

do-while

c)

for loop

d)

if-else-if

9.

Which of the following statement about for loop is true?

a)

Index value is retained outside the loop

b)

Index value can be changed from within the loop

c)

Goto can be used to jump, out of the loop

d)

All of these

10.

A switch statement is used to

a)

To use switching variable

b)

Switch between function in a program char

c)

Switch from one variable to another variable

d)

To choose from multiple possibilities which may arise due to different values of a single variable