ladielynn6306 ladielynn6306
  • 18-01-2020
  • Computers and Technology
contestada

Assume that c is a char variable has been declared and already given a value. Write an expression whose value is true if and only if c is a newline character.

Respuesta :

ijeggs
ijeggs ijeggs
  • 18-01-2020

Answer:

(c == '\n')

Explanation:

The following code in C++ shows the use of this expression

#include <iostream>

using namespace std;

int main()

{

char c;

cout<<"Enter a character for c"<<endl;

cin>>c;

if (c == '\n'){

   cout<<"True"<<endl;

}

else

   cout<<"False"<<endl;

   return 0;

}

Answer Link

Otras preguntas

Which is a true statement about tobacco? A:Smokeless tobacco is safer than smoking tobacco because you do not have a risk of cancer. B:Smokeless and smoke tobac
why is discovering characters movation important ?
Which interjection best completes the sentence? __________! What a wonderful gift! a. Oh my b. Ouch c. Okay d. Oops
Match the fallacy with its name. 1.Being tall, I am unable to ski well. 2.Your grandfather died in World War II; you of all people should support veterans. Na
3 x 8 plus 9 plus 62 =
Briefly explain how you would talk to a friend you run into at a mall as opposed to how you would write a letter to a UNIVERSITY, requesting your statement of r
Why was the Triple Entente formed ??
His bone-crushing hugs Which poetic technique does Shapiro use in this line?
The Nazis made Jews wear _________ on their clothing.
what is 992,449 rounded to the nearest hundred thousand