QP-LPS

QP-LPS

25 Qs

quiz-placeholder

Similar activities

THURSDAY: Language Review

THURSDAY: Language Review

1st - 5th Grade

20 Qs

Gerak

Gerak

KG - University

20 Qs

Mr. Kasih Test of Aplication letter Kelas XII

Mr. Kasih Test of Aplication letter Kelas XII

KG - University

21 Qs

PANILAIAN TENGAH SEMESTER 2 PAI & BP KELAS 5

PANILAIAN TENGAH SEMESTER 2 PAI & BP KELAS 5

KG - University

22 Qs

La storia più grande - Videolezione Unità 09

La storia più grande - Videolezione Unità 09

KG - University

24 Qs

World War I and the Interwar Period Quiz

World War I and the Interwar Period Quiz

KG - University

20 Qs

History of Africa Review

History of Africa Review

KG - University

20 Qs

QP-LPS

QP-LPS

Assessment

Quiz

others

Practice Problem

Hard

Created by

Rajesh Yelchuri

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

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?