luckyaskker6047 luckyaskker6047
  • 07-08-2019
  • Computers and Technology
contestada

If chr is a character variable, which of the following if statements is written correctly? A. if (chr = "a") B. if (chr == "a") C. if (chr = 'a') D. if (chr == 'a')

Respuesta :

ExieFansler ExieFansler
  • 12-08-2019

Answer:

D.if(chr=='a')

Explanation:

Since chr is a character variable means it can only store a single character it could be any character.Characters are written in c++ language using single quotes out of the other three statements two of them uses double quotes and the third uses assignment operator instead equal to operator.Double quotes are used for null terminated strings.

Answer Link

Otras preguntas

NEED HELP NOW . which cycle does the rotavirus go though is it lytic or lysogenic
What determines an organisms energy role in a food chain?
Order the following list of numbers from least to greatest V35, 5.7, 17/3, 5.83​
Jim and Susan are both in good health and Jim has a reasonably secure career. Jim currently has an income of $70,000 and has 2 children. Jim has been married to
Solve for x: 0= 2y^2-8y-10
Negative one and three fifths divided by negative two thirds
The heat index temperature:___________ a. bines air pressure and temperature in a comfort index b. bines relative humidity and temperature in a comfort index c.
Explain why are the constrllations of the zodiac seen in both boston and brazil?
Factor completely. -3x^2 +6x +9=
A student has their teeth cleaned. The hygienist nicks their gum tissue. The student develops endocarditis due to Streptococcus. What kind of pattern of infecti
good job