A

Admin • 828.03K Points
Coach

Q. %lf is used to display?

  • (A) long float
  • (B) double
  • (C) float
  • (D) All of above
  • Correct Answer - Option(A)
  • Views: 8
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

 

  • In C, float, double, and long double are different data types.
  • %lf is used in printf() to format and display a double value.
  • However, in scanf(), %lf is used to read a double value, whereas %f is used for float.

Correct Format Specifiers:

Thus, %lf is specifically used for double.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.