533 B
533 B
| id | tags | created | |
|---|---|---|---|
| 5faz2y2e |
|
Thursday, February 29, 2024 | 17:41 |
Format specifiers in C
| Specifier | Usage |
|---|---|
%c |
char |
%s |
string |
%n |
nothing |
%i |
integer |
%f |
float |
Format specifiers define the type of data to be printed or interpolated in standard output. You need to use format specifiers whenever you are printing values in C.
For example:
int age = 37
printf("My age is %i", age)