Question: Based on the following code, what is the value of y if x = 5? int x, y; if (x < 4) y =
Based on the following code, what is the value of y if x = 5? int x, y; if (x < 4) y = 2; else if (x 4) { if (x > 7) y = 4; else } else y = 6; y = 8;
Step by Step Solution
There are 3 Steps involved in it
Given in the code 1 If x is less than 4 then y is set to 2 2 If ... View full answer
Get step-by-step solutions from verified subject matter experts
