Search Header Logo

Looping - C program

Authored by Mrs. D.

Other

University

Used 3+ times

Looping - C program
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

for

while

do while

All of the given

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose correct C while loop syntax.

while(condition)

{

//statements

}

{

//statements

}while(condition)

while(condition);

{

//statements

}

while()

{

if(condition)

{

//statements

}

}

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose a correct C for loop syntax.

for(initalization; condition; incrementoperation)

{

//statements

}

for(declaration; condition; incrementoperation)

{

//statements

}

for(declaration; incrementoperation; condition)

{

//statements

}

for(initalization; condition; incrementoperation;)

{

//statements

}

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose a correct C do while syntax.

dowhile(condition)

{

//statements

}

do while(condition)

{

//statements

}

do

{

//statements


}while(condition);

do

{

//statements


}while(condition)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of C Program.?

int main()

{

while(true)

{

printf("RABBIT");

break;

}

return 0;

}

RABBIT

RABBIT is printed unlimited number of times.

No output

Compiler error.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of C Program.?

int main()

{ int a=5;

while(a=123)

{ printf("RABBIT\n");

break;

}

printf("GREEN");

return 0;

}

GREEN

RABBIT

GREEN

RABBIT is printed unlimited number of times.

Compiler error.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of C Program.?

int main()

{

int a=32;

do

{

printf("%d ", a);

a++;

}while(a <= 30);

return 0;

}

32

33

30

No Output

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?