?C???,?????????????????printf()
????printf()
??????????????????????????????
??????????:
%d
:????????%f
:??????%s
:??????%c
:?????%o
:????????%x
:?????????%p
:???????
??????????????,????????????????????:
int age = 20; float height = 1.75; char name[] = "John"; printf("My name is %s, I'm %d years old and %.2f meters tall.\n", name, age, height);
?????,%s
?%d
?%.2f
?????????????????????????????????????????,????????????????????
??,printf()
???????????????????????,?]
???????5??????,%8.2f
???????8?????????????
??,C???????????????,?sprintf()
?fprintf()
,????????printf()
??,????????????????????????