QP-LPS

QP-LPS

25 Qs

quiz-placeholder

Similar activities

Duplicate of C1 Roadmap Unit 4

Duplicate of C1 Roadmap Unit 4

KG - University

20 Qs

C Programming (Pre test ET Sec B)

C Programming (Pre test ET Sec B)

Professional Development

25 Qs

Sensory Terms Quiz

Sensory Terms Quiz

10th Grade

20 Qs

C-Decision-making-Question-database

C-Decision-making-Question-database

KG - University

24 Qs

CODETRONICS WORKSHOP TEST

CODETRONICS WORKSHOP TEST

Professional Development

30 Qs

8202 Cable selection Booster

8202 Cable selection Booster

KG - University

20 Qs

Year 13 Benchmark Assessment

Year 13 Benchmark Assessment

KG - University

24 Qs

MAPEH 3 - REVIEW

MAPEH 3 - REVIEW

3rd Grade

20 Qs

QP-LPS

QP-LPS

Assessment

Quiz

others

Hard

Created by

Rajesh Yelchuri

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid syntax for a for loop in C?
for (initialization; condition; update)
for (condition; initialization; update)
for (initialization; update; condition)
for (condition; update; initialization)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times will the following loop execute? for (int i = 0; i < 5; i++) { printf("%d", i); }
4
5
6
Infinite

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? int i = 0; while (i < 3) { printf("%d", i); i++; }
012
0123
123
1234

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which loop is guaranteed to execute at least once?
for loop
while loop
do-while loop
Both for and while

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to exit a loop prematurely?
continue
break
goto
return

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code? for (int i = 1; i <= 3; i++) { printf("%d", i); }
1 2 3
2 1 2
1 2 3 4
Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement skips the current iteration of a loop?
skip
pass
continue
break

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?