Search Header Logo

C loop

Authored by sobha xavier

Computers

University

Used 5+ times

C loop
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Choose a right C Statement.

A) Loops or Repetition block executes a group of statements repeatedly.

B) Loop is usually executed as long as a condition is met.

.

C) Loops usually take advantage of Loop Counter

D) All the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Loops in C Language are implemented using.?

A) While Block

B) For Block

C) Do While Block

D) All the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

4.

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 } }

5.

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 }

6.

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);

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of C Program.?

int main()

{

while(true)

{

printf("RABBIT");

break;

}

return 0;

}

A) RABBIT

B) RABBIT is printed unlimited number of times.

C) No output

D) Compiler error.

Answer explanation

while(TRUE) or while(true) does not work. true is not a keyword.

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?

Discover more resources for Computers