Computer Science, asked by adilbarwal2439, 1 month ago

7. 2. The output of the statement print ('%2f', 11.1234) is 11.12 b. 11.1234 11.23 d. 11/​

Answers

Answered by thakrepayal
0

From the given question the correct answer is

The output of the statement print ('%2f', 11.1234) is 11.1234.

Answered by Tulsi4890
0

The output of the statement print ('%2f', 11.1234) is 11.1234

  • The % in the given statement acts as a special character to let the compiler know that it has to be replaced.
  • The f represents the floating-point number.
  • 2f means that only take the number till 2 digits before the decimal.
  • And thus when all this is applied to 11.1234 it will print the number as it is because only two digits are present before the decimal already.
  • In the case of JAVA, the exact output would be 11.123400 because JAVA prints 6 precision figures after the decimal.

Similar questions