Search Header Logo

C Conditionals Quiz

Authored by Ed Sepulveda

Computers

9th - 12th Grade

C Conditionals Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement is used to test an expression and execute code based on its truth?

switch statement

else statement

else-if statement

if statement

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of an else-if statement?

To execute code when all preceding if and/or else-if statements return false

To compare a value against multiple cases

To test an expression and execute code based on its truth

To test an expression after an existing if or else-if statement

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a ternary operator do?

Tests an expression after an existing if or else-if statement

Tests an expression and executes code based on its truth

Acts as a condensed if-else statement

Executes code when all preceding if and/or else-if statements return false

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement is used to compare a value against multiple cases?

switch statement

ternary operator

if statement

else-if statement

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which logical operator is used to test multiple expressions?

&&

||

!

All of the above

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?