Examveda
Examveda

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: Option D


Join The Discussion

Related Questions on Object Oriented Programming Using C Plus Plus

A default catch block catches

A. all thrown objects

B. no thrown objects

C. any thrown object that has not been caught by an earlier catch block

D. all thrown objects that have been caught by an earlier catch block