Question: Choose the correct program that round off x value (a float value) to an int value to return the output value 4, float x =

Choose the correct program that round off x value (a float value) to an int value to return the output value 4, float x = 3.6; int y = (int) (x + 0.5); printf ("Result = %d ", y ); float x = 3.6; int y = int(x + 0.5); printf ("Result = %d ", y); float x = 3.6; int y = int(x + 0.5); printf ("Result = %d ", y); float x = 3.6; int y = (int) ((int) x + 0.5) printf ("Result = %d ", y )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
