Choose the correct formatted code.

Nguyễn Trà

New member
Choose the correct formatted code.
A.
cout << "Hai"
<< "Good morning";
B.
cout << "Hai" <<
"Good morning" << endl;
C. cout<<"Hai";
D. cout>>"Hai";
 
Answer: b
Explanation: If a long line that is broken into pieces is broken with an operator, the operator should be placed at the end of the line, not the start of the next line.
 

Tìm kiếm

Back
Top