QP-LPS

QP-LPS

25 Qs

quiz-placeholder

Similar activities

Robotics and Control Systems Theory Test

Robotics and Control Systems Theory Test

KG - University

20 Qs

CodeHS Units 7-9 Quiz

CodeHS Units 7-9 Quiz

KG - University

21 Qs

Prelims for Software

Prelims for Software

KG - University

25 Qs

Fingerprints

Fingerprints

9th - 12th Grade

21 Qs

PF Surprise Quiz-1 (AY 2024-25)

PF Surprise Quiz-1 (AY 2024-25)

KG - University

24 Qs

Coding Contest Quiz

Coding Contest Quiz

KG - University

30 Qs

First Round

First Round

KG - University

25 Qs

Ser/Estar Quiz

Ser/Estar Quiz

KG - University

21 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?