Combining Conditions

  • For a more complex conditions, C/C++ provides a mean to combine the basic conditions.
  • The operator to combine them are &&, ||, and ^^.
  • && operator stands for "and". It means that both conditions must evaluate to true before going to the first command block.
  • || operator stands for "or". It means that either conditions or both must evaluate to true before going to the first block.
  • ^^ operator stands for "xor". It means that either conditions but not both must evaluate to true before going to the first block.
  • For details of "and", "or", and "xor" logic, please refer to logic classes.

 


Where to go

Chapter 2
News Page
Lesson 1 contents
Contacting Me


Roby Joehanes © 2001