Selection Statements

Selection Statements

University

15 Qs

quiz-placeholder

Similar activities

Quiz on neural network unit II

Quiz on neural network unit II

University

16 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

Computer Architecture Unit 3

Computer Architecture Unit 3

University

15 Qs

BCA

BCA

University

10 Qs

PHP First Internal Practical Viva

PHP First Internal Practical Viva

University

20 Qs

Selection Statements

Selection Statements

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

MA. PANGALIMAN

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

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

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