Ask Question

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.

+2
Answers (1)
  1. 13 August, 09:40
    0
    (c = = '/n')

    Explanation:

    The following code in C+ + shows the use of this expression

    #include

    using namespace std;

    int main ()

    {

    char c;

    cout<<"Enter a character for c"<
    cin>>c;

    if (c = = '/n') {

    cout<<"True"<
    }

    else

    cout<<"False"<
    return 0;

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “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 ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers