Conditional and unconditional Statements

Conditional and unconditional Statements

University

15 Qs

quiz-placeholder

Similar activities

Repaso U1

Repaso U1

University

16 Qs

PHP First Internal Practical Viva

PHP First Internal Practical Viva

University

20 Qs

Tin 8/1

Tin 8/1

KG - University

10 Qs

Prework Etapa 1 - Bogotá

Prework Etapa 1 - Bogotá

University

10 Qs

Ulangan harian 1 Algoritma dan Pemrograman

Ulangan harian 1 Algoritma dan Pemrograman

12th Grade - University

13 Qs

GIS Unit-1

GIS Unit-1

University

15 Qs

Microcontroller

Microcontroller

11th Grade - University

10 Qs

Input, output and storage de

Input, output and storage de

8th Grade - Professional Development

14 Qs

Conditional and unconditional Statements

Conditional and unconditional Statements

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Athulya SRK

Used 3+ 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

Access all questions and much more by creating a free account

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?

Discover more resources for Computers