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

Answer the following questions below. 1. What is a delta cell? 2. What microscope is used to view a delta cell?​
List the area of multimedia and explain​
I can’t understand this - (pic)
Which of the numbers below is not only a natural number, but also a whole number, a rational number, and an integer?
Answer this question correctly and you will be marked brainlist
What does Jane think school will be like at lowood
According to a study, young people are just as good as adults at ___(blank)
What simple machine you can find in a pinball machine?
Read this excerpt from The Way to Rainy Mountain. She could tell of the Crows, who she had never seen, and of the Black Hills, where she had never been. I wante
Because Helen was prepared to pay cash for a yellow car with a marked price of $9200 she was given a discount of $1012 what percentage was the discount of the m