Search Header Logo

CSC126_Quiz5: Chapter 3

Authored by TS ZAKARIA

Computers

University

CSC126_Quiz5:  Chapter 3
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of selection control structures in C++?

To execute different statements based on conditions

To define data types

To repeat statements based on conditions

To execute statements in a sequence

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a type of selection control structure in C++?

if

loop

if-else

switch

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a Boolean expression evaluate to?

A string

True or false

A character

An integer

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to combine two Boolean expressions?

Relational operator

Logical operator

Arithmetic operator

Bitwise operator

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a two-way if-else selection structure, what happens if the condition is false?

The first statement is executed

The condition is re-evaluated

The program terminates

The second statement is executed

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for a one-way if selection statement?

if expression then statement;

if (expression) { statement; }

if (expression) statement else statement;

if (expression) statement;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of a compound Boolean expression?

10 > 5

x == y

(10 > 5) && (10 < 6)

a != b

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?