Selection Statements

Selection Statements

University

15 Qs

quiz-placeholder

Similar activities

Berpikir Komputasi - Assessment 1

Berpikir Komputasi - Assessment 1

University

20 Qs

Operating system - Fun Review 2

Operating system - Fun Review 2

University

10 Qs

DreamWeaver CS6

DreamWeaver CS6

University

20 Qs

Introduction to Computers

Introduction to Computers

University

20 Qs

Topic 4-2: Multiple if-else and switch-case

Topic 4-2: Multiple if-else and switch-case

University

10 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

PHP Quiz - 1

PHP Quiz - 1

University

20 Qs

CLOUD COMPUTING: ACTIVITY 3

CLOUD COMPUTING: ACTIVITY 3

University

10 Qs

Selection Statements

Selection Statements

Assessment

Quiz

Computers

University

Medium

Created by

MA. PANGALIMAN

Used 19+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following best describes the role of selection statements in C++?

They define loops that execute repeatedly

They allow decision-making based on conditions

They specify the order of function calls in a program

They are only used for handling errors

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is NOT a selection statement in C++?

if statement

switch statement

for loop

conditional operator ('?:')

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What will be the output of the following code if `x = 10`?

Greater than 5

Greater than 5 End

End

Compilation error

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following correctly represents a compound if statement?

if (x > 0) cout << "Positive"; cout << "Number";

if (x > 0) { cout << "Positive"; cout << "Number"; }

if x > 0 { cout << "Positive"; cout << "Number"; }

if (x > 0) cout << "Positive", cout << "Number";

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What will be the output if the user enters `15` in the following code?

Even

Odd

Compilation Error

No output

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which statement correctly implements an if-else structure?

Media Image
Media Image
Media Image
Media Image

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What is the output if `a = 20` in the following code?

A) A is large

B) A is medium

C) A is small

D) Compilation error

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?