Which statement allows you to properly check the char variable code to determine whether it is equal to a "C" and then output "This is a check" and then advance to a new line?
A) if code is equal to C
Cout << "This is a check\n";
B) if (code = "C")
Cout << "This is a check" << endl;
C) if (code == 'C')
Cout << "This is a check\n";
D) if (code == C)
Cout << "This is a check" << endl;
Correct Answer:
Verified
Q3: This operator takes an operand and reverses
Q23: What is the value of the following
Q24: Given the following code segment, what is
Q26: What will the following program display?
Q26: In C++ the = operator indicates:
A)equality
B)assignment
C)subtraction
D)negation
E)None of
Q28: What is the value of the following
Q30: What will the following segment of
Q32: This operator performs a logical NOT operation.
A)--
B)!
C)<>
D)><
E)None
Q34: The _ of a variable is limited
Q37: The default section of a switch statement
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents