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

On my way to your house I saw a black cat. where do i put the comma
Question 10(Multiple Choice Worth 2 points)(09.02 MC)There are 8 cans of soda shared equally between 14 people. What fraction of a can of soda does each person
I really need help. Giving brainliest to the real answer. Please my grade closes tomorrow (don’t mind the writing I tried doing it myself)
what is a huge source of tourism in middle amercia
according to your textbook, the credibility of a speaker produced by everything the speaker says or does during the speech itself is called
2+2 just so I can test this app out to see if it is legit
what is the prime number of 65​
Which expression is equivalent to \Large \frac{2^{8}}{2^{-1}}\normalsize? 2 −1 2 8 ​ ?
Which of the following is a cardiac health benefit of exercise?
Which of these was not a natural resource in England Cotton Coal Iron Streams