Lab5_Quiz_section2

Lab5_Quiz_section2

University

10 Qs

quiz-placeholder

Similar activities

Sains Komputer (Java) 3: Struktur Kawalan Pilihan II

Sains Komputer (Java) 3: Struktur Kawalan Pilihan II

10th Grade - University

10 Qs

AWD Quiz #2

AWD Quiz #2

University

10 Qs

Tut2 - If / Else + Switch Cases

Tut2 - If / Else + Switch Cases

University

9 Qs

Quiz 2

Quiz 2

University

11 Qs

Estructuras de control c++

Estructuras de control c++

University

8 Qs

Web Dev Midterm Quiz

Web Dev Midterm Quiz

University

15 Qs

Topic 5-1: while loop

Topic 5-1: while loop

University

8 Qs

C++ : Selection

C++ : Selection

University

9 Qs

Lab5_Quiz_section2

Lab5_Quiz_section2

Assessment

Quiz

Computers

University

Hard

Created by

bme programming

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does an if statement check?

If a variable is declared

If a condition is true

If a loop is working

If a function is called

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used for multiple conditions in if-else blocks?

elif

switch

else if

elseif

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will if (true||false) return?

Error

True

False

Null

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does nested if mean?

One if inside another

An infinite loop

A standalone if block

A function inside a loop

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can an if statement exist without an else?

Yes

No

Only in loop

Only in functions

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a switch case?

For looping through arrays

For choosing between multiple options

For defining variables

For declaring functions

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you add a default block in a switch statement?

case default:

default:

else:

default case:

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?