Search Header Logo

Quiz on Decision Control Structures in C Programming

Authored by <3 M.

Information Technology (IT)

University

Quiz on Decision Control Structures in C Programming
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to implement the decision control instruction in C?

switch

if

while

for

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the else statement in an if-else construct?

To execute a statement if the condition is true

To create a loop

To execute a statement if the condition is false

To terminate the program

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the general form of an if statement for multiple statements?

if(condition) statement;

if(condition) { block of statement; }

if { condition } statement;

if(condition) then statement;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the break statement do in a switch-case structure?

Exits the switch block

Starts a new case

Ends the program

Continues to the next case

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following cannot be tested using a switch statement?

String expressions

Float expressions

Integer expressions

Character expressions

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default case in a switch statement used for?

To handle all cases

To execute the first case

To handle the case when none match

To terminate the program

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an if-else ladder?

A series of nested if statements

A single if statement

A switch statement

A loop structure

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?