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

The length of a rectangular poster is 28 inches. The area is 1316 square inches. What is the width?
Which would you use to estimate the demand for a product at various prices?A. a demand tableB. a demand chartC. a demand schedule​
what happened to personal income between the years 1921 and 1922
Laloni is participating in her school's out the average number of pagess that in January she read 195 pages i es. What is the average number of pages she in her
MANY PTS AND BRAINLY FAST Use the method of completing the square to transform the quadratic equation into the equation form (x + p)2 = q. -6x2 + -6x + 12 =
Tenor saxophonist __________ helped popularize the bossa nova with several hit recordings. This Latin style that, which developed in the late 1950s and early 19
The program that solves problem 2 (a) on p.275 should be named as proj4_a.c. It must include and implement the following function prototypes to solve problem 2
Ratios that are equivalent to 8 : 20
Add: 43 + ( -13) Will mark show work if correct
whats tan? some help i dont understand. I need the steps​