Question: Assume a program has the following variable definitions: int numi: double num2 int sum: and the following statement: sum numi+num2: Which automatic data type conversion

 Assume a program has the following variable definitions: int numi: double

Assume a program has the following variable definitions: int numi: double num2 int sum: and the following statement: sum numi+num2: Which automatic data type conversion will take place? O A num1 is promoted to a double num2 remains a double, and the result of num1+ num2 is an int. B.num1 is promoted to a double, num2 remains a double, and the result of numi+num2 is a double C. num2 is demoted to an int, numis remains an int, and the result of num1+ num2 is an int

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!