Vidyalelo
Computer Science · Q288

Object Oriented Programming Using C++

Engineering and GATE · Computer Science · question 288

Q288

Assume you want to compare the character stored in the initial variable to the letter a. Which of the following conditions should you use in the if statement? (Be sure the condition will handle a or A.)

A.
(initial = 'a' or 'A')
B.
(initial == 'a' or 'A')
C.
(toupper(initial) = 'A')
D.
(toupper(initial) == 'A')
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board