Geography, asked by madhurikodavati3, 3 months ago

What will be the output /error?
Int main ()
{
Printf("%. Of", 5.89);
Return 0;
}



Answers

Answered by koinihumai
0

Answer:

type error string and integer cannot be concatenated

Answered by kartavyaguptasl
0

Answer:

The output of the given piece of code is as follows:

6

Explanation:

The use of command "%f" takes the argument as a floating point data type. But the modification of the command as "%.0f" makes the compiler display the result without any decimal point but after rounding off to the nearest integer.

Thus, 5.89 is displayed as 6 as no decimal points are displayed and it is rounded off to the nearest integer which is 6.

#SPJ3

Similar questions