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

[tex]-2y + y - 3 = 6 [/tex]
List three major ways identity and way of life in the colonies differed from england
What are 3 ways to name a line
What is one of the best ways that seller servers can be sure they are adhering to the law?
Which group sparked a mass exodus to Oregon?
is x^4 +400 a complex conjugate
Aram gave Steve 38 of his baseball cards. He then had 145 cards left. How many did he have to begin with?
Para preparer el te primero es necesario el agua
The feeling of forming a close social bond with another person is known as
in the morning there were s students in the library in the afternoon there were 4 fewer students in the library than in the morning write an expression for the