Format Specifiers
Format specifiers are the operators used in printf() function to print the data which is referred by an object or a variable. when a value is stored in a particular variable
Format specifier | Characters matched | Argument type |
%c | any single character | char |
%d, %i | integer | integer type |
%u | integer | unsigned |
%o | octal integer | unsigned |
%x, %X | hex integer | unsigned |
%e, %E, %f, %g, %G | floating point number | floating type |
%p | address format | void * |
%s | any sequence of non-whitespace characters | char |
// file name P04.C void main() { int i=10; char c='A'; float pi =3.14; clrscr(); printf("%d",i); printf("%c",c) printf("%f",pi); getch(); }