Quiz on Selective Structures in Programming

Quiz on Selective Structures in Programming

University

15 Qs

quiz-placeholder

Similar activities

Python L1

Python L1

8th Grade - University

14 Qs

Flow of Control in C++ ( Conditional statements)

Flow of Control in C++ ( Conditional statements)

9th Grade - University

17 Qs

Understanding Functions in Programming

Understanding Functions in Programming

9th Grade - University

20 Qs

Introduction to Programming

Introduction to Programming

7th Grade - University

16 Qs

if/else statements quiz

if/else statements quiz

9th Grade - University

10 Qs

Python

Python

University

15 Qs

Web Dev Midterm Quiz

Web Dev Midterm Quiz

University

15 Qs

AWD Quiz #2

AWD Quiz #2

University

10 Qs

Quiz on Selective Structures in Programming

Quiz on Selective Structures in Programming

Assessment

Quiz

Computers

University

Medium

Created by

NUR ENZAI

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the most basic selective statement?

while loop

for loop

if statement

switch statement

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if the condition in an if statement is FALSE?

The statement is executed

The statement is skipped

The program terminates

The condition is re-evaluated

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

In an if...else statement, what is executed if the condition is TRUE?

Statement B

Statement A

Both statements

None of the statements

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the switch...case statement?

To create loops

To define functions

To execute a single statement

To substitute for long if statements

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What must follow each case label in a switch statement?

exit

break

return

continue

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a nested if structure involve?

Multiple switch statements

An if statement within another if statement

A function within an if statement

A loop within an if statement

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for an if...else...if statement?

if condition 1, statement 1; else if condition 2, statement 3;

if condition 1, statement 1; else statement 2;

if condition 1, statement 1; else if condition 2, statement 2;

if condition 1, statement 1; if condition 2, statement 2;

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?