A

Admin • 802.91K Points
Coach

Q. %f access specifier is used for ________.

  • (A) Integral types
  • (B) Floating type
  • (C) Strings
  • (D) All of above
  • Correct Answer - Option(B)
  • Views: 4
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

 

  • %f is a format specifier in C language used for printing floating-point numbers (i.e., float and double types).
  • It is used with printf() and scanf() functions to handle floating-point values.

Example:

#include <stdio.h>
int main() {
float num = 12.345;
printf("The number is: %f
", num);
return 0;
}

Output:

The number is: 12.345000

Breakdown of Options:

Correct Answer:

(B) Floating type

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.