Conditional and unconditional Statements

Conditional and unconditional Statements

University

15 Qs

quiz-placeholder

Similar activities

Briefing Besar PIM III

Briefing Besar PIM III

University

20 Qs

ADVACOMT-Quiz No.1 (final term)

ADVACOMT-Quiz No.1 (final term)

University

15 Qs

Web-II-Loop and Function

Web-II-Loop and Function

University

10 Qs

WN-CELLULAR CONCEPT

WN-CELLULAR CONCEPT

University

10 Qs

Soal SKD

Soal SKD

University - Professional Development

10 Qs

PBO Inheritance Episode 2

PBO Inheritance Episode 2

University

18 Qs

Logika & Pemrograman (ID)

Logika & Pemrograman (ID)

10th Grade - Professional Development

20 Qs

Porcentajes

Porcentajes

University

12 Qs

Conditional and unconditional Statements

Conditional and unconditional Statements

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Athulya SRK

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

for (int i = 0; i < 3; i++) {

printf("%d ", i);

}

return 0;

}

1 2 3

0 1 2

0 0 0

Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

int count = 2;

while (count > 0) {

printf("Hello ");

count--;

}

return 0;

}

Hello Hello

Hello

Hello Hello Hello

"Hello"

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

int x = 3;

while (x > 0) {

printf("%d ", x);

x--;

}

return 0;

}

3 2 1 0

4 2 0

3 2 1

3 3 3

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

int y = 0;

do {

printf("%d ", y);

y++;

} while (y < 3);

return 0;

}

2 1 0

1 2 3

0 1 2

1 2

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

int count = 1;

while (1) {

printf("%d ", count);

count++;

if (count > 5) {

break;

}

}

return 0;

}

1 2 3 4

5

0

1 2 3 4 5

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

for (int i = 1; i <= 5; i++) {

if (i % 2 == 0) {

continue;

}

printf("%d ", i);

}

return 0;

}

1 3 5

1 2 3 4 5

0 1 2 3 4

0 2 4

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

int z = 5;

for (int i = 0; i < z; i++) {

if (i % 2 != 0) {

printf("%d ", i);

}

}

return 0;

}

1 3

0 2 4

1 2 3 4

2 4

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?