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

1. In C++ you can assign an expression of type double to a variable of type int with no problem.

2. To put a character into a cstring constant that causes the output to continue on the next line, insert the escape sequence \t into the string constant.


1. False
Explanation: In general assigning a floating point value to an integer variable mostly loses information. A warning message (or an error message) is issued by C++ compilers.
2. False
Explanation: \t is the tab escape sequence. Use \n instead.
Explanation: The code is illegal because its execution depends on the order of evaluation of arguments. Various compilers give different answers. One compiler this writer uses gives 3 2 1.

Computer Science & Information Technology

You might also like to view...

All of the following statements are TRUE about hiding worksheet tabs EXCEPT:

A) Once you hide the tabs, you have to show them again to continue navigating to individual worksheets. B) When you hide a worksheet, hyperlinks to that worksheet will still work. C) Hiding worksheet tabs will affect the entire workbook. D) To unhide a worksheet, right-click any worksheet tab, select Unhide, select the name of the hidden worksheet, and click OK.

Computer Science & Information Technology

When installing external SCSI devices, terminators are required on: (Select TWO)

A. the SCSI adapter. B. each device. C. the first device. D. the last device. E. the servers parallel port.

Computer Science & Information Technology

In the Audio or Video dialog box, you can switch to the Details pane by first tapping or clicking the ____ button.

A. OneDrive B. Properties C. Views D. Organize

Computer Science & Information Technology

Critical Thinking Questions Case I-2 ? Desiree is developing her website promoting her business by using the web programming language most relevant to her needs. Desiree would like to have users fill out a form online. Which of the following is most likely to be the code that the web server processes in order to administer this action? a. XMLc. jQueryb. PHPd. DHTML

What will be an ideal response?

Computer Science & Information Technology