Answer the following statements true (T) or false (F)

1) Declarations can appear almost anywhere in the body of a C++ function.
2) The remainder operator (%) can be used only with integer operands.
3) The arithmetic operators *, /, %, + and – all have the same level of precedence.
4) A C++ program that prints three lines of output must contain three statements using
cout and the stream insertion operator.
5) All operators are evaluated from left to right.

1) True.
2) True.
3) False. The operators *, / and % have the same precedence, and the operators + and -
have a lower precedence.
4) False. One statement with cout and multiple \n escape sequences can print several lines.
5) False. Some operators are evaluated from left to right, while other operators are evaluated right to left.

Computer Science & Information Technology

You might also like to view...

During an import operation, how many worksheets can you import into Access at one time?

A) An unlimited number B) One C) Two D) Three

Computer Science & Information Technology

Which of the four critical business functions includes processes and an activity related to how an organization defines goals and creates software within development projects?

A. Construction B. Deployment C. Verification D. Governance

Computer Science & Information Technology