Meaning of expressions like"%d" in c++

What is the meaning of expressions like "%d", "%c","%s" in C++

For example, what does the "%d" in the following code fragment stand for?

1
2
3
#include <stdio.h>
  int value = 10;
  printf("%d", value);

Thank You
It is
a conversion specifier character that specifies the type of conversion to be applied.
d,i The int argument is converted to signed decimal in the style [−]dddd
(the C Standard).

This meaans that value will be outputed as a signed decimal.
I typically don't like using %d, but it is used for a placeholder of an integer. %i also works for an integer, %c is a character, and %s is string.
Topic archived. No new replies allowed.