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

1. The names x, y, and z are satisfactory variable names for the lengths of the legs and hypotenuse of a triangle.

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


1. False
Explanation: Names should communicate to the human reader the meaning of the value. These identifiers do not communicate the meaning of their values..
2. True
Explanation: Assignment from an integer type to a floating point type can lose information and should be avoided. Some compilers will warn, others may give an error message, but you should avoid this.

Computer Science & Information Technology

You might also like to view...

Write a program that reads in two integers and determines and prints whether the first is a multiple of the second. (Hint: Use the modulus operator.)

What will be an ideal response?

Computer Science & Information Technology

What icon would you use to show, hide, or format the chart title, data labels, or legend?

A) Chart Area B) Chart Styles C) Chart Elements D) Chart Filters

Computer Science & Information Technology

Information such as annotations, headers, and footers are checked by Word's ________ for identifying information

Fill in the blank(s) with correct word

Computer Science & Information Technology

What happens when you click the table move handle?

A. The table moves. B. All the rows and columns are automatically resized. C. The entire table is selected. D. The pointer changes to the Move pointer.

Computer Science & Information Technology