Phone

+234-70322-53598

Email

atgventuresinfo@gmail.com

Opening Hours

Mon - Sat: 7AM - 7PM

In C programming, the % character is used as a format specifier for formatting the output of variables when printing or displaying them.

The differences between %C, %D, and %f are as follows:

  1. %C: This is used to format and print a single character. It takes an argument of type char, which represents a single character. It will print the character as it is, without any formatting.
  2. %D: This is used to format and print an integer in decimal format. It takes an argument of type int, long int, or long long int. It will print the integer in decimal format, without any leading zeros or decimal points.
  3. %f: This is used to format and print a floating-point number. It takes an argument of type float, double, or long double. It will print the number with decimal places, depending on the precision specified in the format specifier. For example, %f will print a float with 6 decimal places by default, while %.2f will print the float with only 2 decimal places.

PATRONIZE US JOIN US ON YOUTUBE

Recommended Articles

1 Comment

Comments are closed.