C 語言 printf 常用格式紀錄
型態 |
Printf格式字元 |
Char |
%c |
_Bool |
%i,%u |
Short int |
%hi,%hx,%ho |
Unsigned short int |
%hi,%hx,%ho |
Int |
%i,%x,%o |
Unsigned int |
%u,%x,%o |
Long int |
%li,%lx,%lo |
Unsigned long int |
%lu,%lx,%lo |
long long int |
%lli,%llx,%llo |
Unsigned long long int |
%llu,%llx,%llo |
Float |
%f,%e,%g,%a |
Double |
%f,%e,%g,%a |
Long double |
%Lf,$Le,Lg |
沒有留言:
發佈留言