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

How much ATP could be obtained from the complete oxidation of one molecule of glucose?
In which type of government structure do local states have the greatest power?
What does science study? What does it not study?
Rolls are being prepared to go to grocery stores. Divide 72 rolls into 2 groups so the ratio is 3 to 5.
Your parents order an oven from England. The temperature dial on the new oven is calibrated in degrees Celsius. If you need to bake a cake at 350°F in the new
What is 0.32 as a fraction and percent
4th grade go math question: write the name of the period that has the digits 913 in the number 913,256
What is the first number greater than 106637 where it's tens and units digits are the same
F=9\5c+32 expresses the relationship between celcius and fahrenheit. Slove for c
PLEASSSE HELP GIVING A LOT OF POINTS TO FAST REPONDERS!!