QP-LPS

QP-LPS

25 Qs

quiz-placeholder

Similar activities

4. Inferences 2

4. Inferences 2

KG - University

20 Qs

TANDING ULANG LOMBA SANDI - RENSCOUT 2024

TANDING ULANG LOMBA SANDI - RENSCOUT 2024

6th - 8th Grade

20 Qs

Duplicate of C1 Roadmap Unit 4

Duplicate of C1 Roadmap Unit 4

KG - University

20 Qs

Latihan Soal OSMJT 4

Latihan Soal OSMJT 4

KG - University

20 Qs

REGLAMENTO DEL BTH - 2023

REGLAMENTO DEL BTH - 2023

KG - University

21 Qs

6è. (Revisió continguts) CEIP Gabriel Janer Manila

6è. (Revisió continguts) CEIP Gabriel Janer Manila

KG - University

21 Qs

PRIMERA FASE 2023

PRIMERA FASE 2023

KG - University

25 Qs

PRE TEST BIMTEK RSPP

PRE TEST BIMTEK RSPP

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?