-
Contributing Member
Format specifiers in C
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.
-
Contributing Member
Re: Format specifiers in C
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
-
Expert Member
Re: Format specifiers in C
format specifiers for integer data type
short signed %d or %i
short unsigned %u
long signed %ld
long unsigned %lu
unsigned hexadecimal %x
unsigned octal %o
format specifiers for real data type
float %f
double %lf
format specifiers for character/string data type
signed character %c
unsigned character %c
string %s
Last edited by aman15490; 02-18-2010 at 09:19 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules