A

Akash Lawaniya • 9.58K Points
Tutor III

Q. %lf is used to display?

  • (A) long float
  • (B) double
  • (C) float
  • (D) All of above

Explanation by: Mr. Dubey

 

  • 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.


Question analytics