adplus-dvertising
frame-decoration

Question

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: (d).(toupper(initial) == 'A')

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. 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...

Similar Questions

Discover Related MCQs

Q. Which of the following C++ expressions is equivalent to the mathematical expression 53 ?

Q. The right shift operator is represented by the symbol

Q. In C++, class definitions are most often

Q. The comma operator (,) is primarily used in conjunction with

Q. To execute a C++ program, you first need to translate the source code into object code. This process is called

Q. The rules of a programming language are called its _____

Q. External documentation includes

Q. A variable's _____ indicates how long the variable remains in the computer's memory

Q. The null character needs a space of

Q. The cout << sales[0] + sales[1]; statement will______

Q. The most efficient data type for a variable that stores the letter C is the _____ data type

Q. The C++ operator used to allocate memory is _________

Q. Assume that your version of C++ can recognize only the first 8 characters of an identifier name, through identifier names may be arbitrarily long. Which of the following identifier names is not distinct:

Q. The C++ keyword for declaring a variable that contains a decimal point is _____

Q. The instructions you enter into the computer are called the _____

Q. The String data type is an extension of the _____ data type

Q. An advantage of using local variables is that _____

Q. Library header files usually contain

Q. A C++ term meaning "generic" is

Q. Before object-oriented exception handling was practiced, _____