Question: What is the result of executing the following code? int num 1 = 2 0 ; double num 2 = 5 0 ; num 2

What is the result of executing the following code?
int num1=20;
double num2=50;
num2= num2/ num1;
num1= num1/ num2;
Question 3Select one or more:
num1 holds 10 and num2 holds 2.5
num1 holds 10 and num2 holds 2
A runtime error occurs
num1 holds 2 and num2 holds 10.0
num1 holds 8 and num2 holds 2
num1 holds 10 and num2 holds 2.0
num1 holds 8 and num2 holds 2.5
A compilation error occurs

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!