To check whether a char variable ch is an uppercase letter, you write ___________.

a. (ch >= 'A' && ch >= 'Z')
b. (ch >= 'A' && ch <= 'Z')
c. (ch >= 'A' || ch <= 'Z')
d. ('A' <= ch <= 'Z')

b. (ch >= 'A' && ch <= 'Z')
A is wrong because ch >= 'Z'. C is wrong because of using ||. D is wrong because of incorrect syntax. The correct answer is B.

Computer Science & Information Technology

You might also like to view...

A selected check box is the equivalent of answering ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

Which of the following can be described as a DoS attack?

A. Disabling a specific system and making it unavailable to users B. Implementing a keylogger C. Intercepting a packet and decrypting the contents D. Communicating with employees to get company information

Computer Science & Information Technology