Some of the format specifiers which I am aware of in C is %d, %f, %s, %c.Is there any other format specifier available? If so let me know about it.
Printable View
Some of the format specifiers which I am aware of in C is %d, %f, %s, %c.Is there any other format specifier available? If so let me know about it.
Janelyn there are yet many format specifiers apart from the one mentioned by you. They are
%c single character
%d and %i both used for integer type
%u used for representing unsigned integer
%o octal integer unsigned
%x,%X used for representing hex unsigned integer
%e, %E, %f, %g, %G floating type
%s strings that is sequence of characters
[u][b]format specifiers for integer data type [/b][/u]
short signed %d or %i
short unsigned %u
long signed %ld
long unsigned %lu
unsigned hexadecimal %x
unsigned octal %o
[u][b]format specifiers for real data type[/b][/u]
float %f
double %lf
[b][u]format specifiers for character/string data type[/u][/b]
signed character %c
unsigned character %c
string %s