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, 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
Get step-by-step solutions from verified subject matter experts
