Question: B. Assume a program has the following variable definitions: int units, float mass double weight; and the following statement: weight = mass units; Which automatic

 B. Assume a program has the following variable definitions: int units,

B. Assume a program has the following variable definitions: int units, float mass double weight; and the following statement: weight = mass units; Which automatic data type conversion will take place? A) mass is demoted to an int, units remains an int, and the result of mass units is an int. B) units is promoted to a float, mass remains a float, and the result of mass * units is a float. C) units is promoted to a float, mass remains a float, and the result of mass units is a double C. Assume a program has the following variable definitions: int a, b = 2; float c = 4.2; and the following statement: a = b c; What value will be stored in a ? A) 8.4 B) 8 C) D) None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!