Quiz


  1. Can you use nested if statements as an alternative to the logical And and Or operators?

  2. Can an if statement be nested in the else if or else part of an if / else if / else statement, or just the if part?

  3. For which of the logical operators do both Boolean expressions have to be true for the overall Boolean expression to be true?

  4. For which of the logical operators do both Boolean expressions have to be false for the overall Boolean expression to be false?

  5. Which of the logical operators reverses the truth of a Boolean expression, making a true expression false and a false expression true?

  6. Assuming resident is a Boolean variable, is if(resident) the same as if(resident == true)?

  7. Which of the logical operators is a unary rather than binary operator?

  8. Which of the logical operators has a higher precedence than the relational operators?

  9. Which logical operator has a higher precedence, And or Or?

  10. Can a Boolean value of either true or false be used following the case keyword in a switch statement?




C++ Demystified(c) A Self-Teaching Guide
C++ Demystified(c) A Self-Teaching Guide
ISBN: 72253703
EAN: N/A
Year: 2006
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net