C examples for Data Type:int
Conversion specifiers in printf() always start with a % character.
Use the escape sequence %% when you want to output a % character.
#include <stdio.h> int main(void) { int salary; // Declare a variable called salary salary = 10000; // Store 10000 in salary printf("My salary is %d.\n", salary); printf("My salary is %%d.\n", salary); return 0;/*ww w . j av a2 s. c om*/ }