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

Provider referral, self-referral, and contract referral are three strategies used to inform past partners of possible STI infection.
which of the following statements best describes the state of the Church in the 14th century, according to the reading?
9. Read these lines from Alfred, Lord Tennyson’s “Ulysses.” “It little profits that an idle king,/By this still hearth, among these barren crags,/Match’d wit
According to Buddhists , nirvana is ?
Undifferentiated schizophrenia differs from other schizophrenic disorders in that symptoms are
What are 3 ways family members positively cope with change
Investing in bonds! PLS HELP 1.) Ralph wishes to protect his investment from inflation. He buys a zero coupon bond. Why is this investment a bad choice for Ralp
An example of cultural differences between Pakistan and Bangladesh is _______________. A.government B.ethnicity C.religion D.all of the above
Express 300 as a product of its exponential notation
what is the world's most musical fish