Q. %lf is used to display?
β
Correct Answer: (A)
long float
Explanation:
- 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.