CSC126_Quiz5:  Chapter 3

CSC126_Quiz5: Chapter 3

University

15 Qs

quiz-placeholder

Similar activities

Java

Java

9th Grade - University

11 Qs

Data Types Java Concepts

Data Types Java Concepts

University

19 Qs

LATIHAN PEMOGRAMAN PASCAL

LATIHAN PEMOGRAMAN PASCAL

University

10 Qs

C TEST

C TEST

University

13 Qs

Get started with python

Get started with python

University

19 Qs

MIT App Inventor - Chapter 4

MIT App Inventor - Chapter 4

University

10 Qs

PF_Q1_IT1104

PF_Q1_IT1104

University

20 Qs

Control Statements - Java

Control Statements - Java

University

15 Qs

CSC126_Quiz5:  Chapter 3

CSC126_Quiz5: Chapter 3

Assessment

Quiz

Computers

University

Hard

Created by

TS ZAKARIA

FREE Resource

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

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?