NAME

Question types


Start with


Question limit

of 7 available terms

Print test

7 True/False questions

  1. How does a switch statement work?if (expression)
    {block of code}
    else
    {block of code}

          

  2. How does an if-else statement work?switch (expression)
    {case value1:
    program statement;
    break;
    default:
    program statement;
    break;
    }

          

  3. Show how the conditional operator works.condition ? : expression1 : expression2

    If the result of the condition is true, then expression1 is evaluated and returned. If the result of the condition is false, then expression2 is evaluated and returned.

          

  4. The conditional operator in objective-c is a ______ operator.condition ? : expression1 : expression2

    If the result of the condition is true, then expression1 is evaluated and returned. If the result of the condition is false, then expression2 is evaluated and returned.

          

  5. What is the boolean type in objective-c?if (expression)
    {block of code}
    else
    {block of code}

          

  6. Whenever a relational expression is evaluated in objective-c, it is given the value1 if the expression is satisfied and 0 if the expression is not satisfied.

          

  7. How do you negate (or flip) the value of a relational expression?! (not)