Can someone help with this multiple choice question for C Su
Can someone help with this multiple choice question for C++
Suppose that x and y are int variables, z is a double variable, and the input is:
28 32.6 12
Choose the values of x, y, and z after the following statement executes:
cin >> x >> y >> z;
x = 28, y = 12, z = 32.6
x = 28, y = 12, z = 0.6
x = 28, y = 32, z = 12.0
x = 28, y = 32, z = 0.6
| a. | x = 28, y = 12, z = 32.6 | |
| b. | x = 28, y = 12, z = 0.6 | |
| c. | x = 28, y = 32, z = 12.0 | |
| d. | x = 28, y = 32, z = 0.6 |
Solution
the output will be d that is x = 28, y = 32, z = 0.6
because here the compiler will take th einput values as three inputs they are int int and double
so when we enter 28 then it take one integer
next when we enter 32.6 here it will 32 as one integer and .6 as double value
