C# Lesson 2 - Quiz

5 Questions | Attempts: 36
Share
Please wait...
Question 1 / 5
0 %
0/100
Score 0/100
1. A condition can be both true and false at the same time.

Explanation

A conditional statement evaluates an expression end returns exactly either Not True (false) or True. It must return one or the other, never neither, and never both.

Submit
Please wait...
About This Quiz
Lesson Quizzes & Trivia

This is the Lesson 2 Quiz. Each question is worth 5 points. Your final score will reflect the percentage of total points that you earned. Please consider re-assessing this lessons if you score less than 70%.

Personalize your quiz and earn a certificate with your name on it!
2. The ______ statement executes a code-block indicated by a value matching that of an argument to the statement.

Explanation

A switch statement matches the value of its single argument against the labels of the code blocks inside the curly-braces for the switch( ){ }. The labels must be valid values for that argument.

Submit
3. What loop checks the condition at the end?

Explanation

The loop that checks all the conditions before the execution of the program is "DO Loop".

Submit
4.  Which data-types are not appropriate arguments to a switch statement?

Explanation

Unlike C, the language most influential to C#, C# itself will allow a string argument to a switch statement to match a case label if the strings are exactly the same. Integers, characters, and strings are appropriate types for switch() in C#.

Submit
5. No type of conditional statement limits the number of statements that can be controlled by that conditional statement.

Explanation

All conditional statements can be applied to a block of code, which has no practical size limit.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 19, 2022 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 19, 2022
    Quiz Edited by
    ProProfs Editorial Team
  • Apr 14, 2012
    Quiz Created by
    Shishira
Cancel
  • All
    All (5)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
A condition can be both true and false at the same time.
The ______ statement executes a code-block indicated by a value...
What loop checks the condition at the end?
 Which data-types are not appropriate arguments to a switch...
No type of conditional statement limits the number of statements that...
Alert!

Advertisement