Looping - C program

Looping - C program

University

10 Qs

quiz-placeholder

Similar activities

C Programming Quiz

C Programming Quiz

University

10 Qs

C PRogram

C PRogram

University

14 Qs

Java Basic Lesson 3

Java Basic Lesson 3

5th Grade - University

9 Qs

Programming practices - C programming

Programming practices - C programming

University

9 Qs

CP-2-Unit-I

CP-2-Unit-I

University

12 Qs

C Programming First Quiz - Sec H

C Programming First Quiz - Sec H

University

10 Qs

Programming Trivia

Programming Trivia

University

10 Qs

D&D 5E Rules Pt. 1

D&D 5E Rules Pt. 1

6th Grade - University

14 Qs

Looping - C program

Looping - C program

Assessment

Quiz

Other

University

Hard

Created by

Mrs. D.

Used 3+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?