Multiple choice

Which expression is true if and only if x is NOT a upper-case letter. x is a char variable

  1. x<'A' && x >'Z'

  2. x<'a' || x >'z'

  3. x<'a' && x >'z'

  4. x<'A' || x >'Z'

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

An uppercase letter is in the range 'A' through 'Z'. To be NOT an uppercase letter, the character must be less than 'A' OR greater than 'Z'.