Question 1(Multiple Choice Worth 3 points) Given the following code segment, double x = 42.3; double y = 11.7; what is the data type of the value of the expression (x % y)? int double numeric Error: possible loss of precision Unable to be determined Question 2(Multiple Choice Worth 3 points) Given the following code segment, int x = 8; int y = 5; what is the data type of the value of the expression (x − y)? int double numeric Error: possible loss of precision Unable to be determined Question 3(Multiple Choice Worth 3 points) Given the following code segment, int d = 18 + 7 % 10 / 3 − 4; what is the value assigned to the variable d? −3 −1 15 16 Error: possible loss of precision Question 4(Multiple Choice Worth 3 points) Given the following code segment, int x = 65; int y = 10; int z = x / y; what is the value assigned to z? 0 5.0 6 6.5 None; a possible loss of precision error occurs Question 5(Multiple Choice Worth 3 points) Given the following code segment, int m = 23; int n = 5; int p = m % n; what is the value assigned to p? 0 3 4 5 None; a possible loss of precision error occurs
Which ones were wrong?
Join our real-time social learning platform and learn together with your friends!