| 数据类型 | 字节数 | 
| bool、char | 1 | 
| short、unsigned short、 | 2 | 
| int、float、unsigned int | 4 | 
| double、long、unsigned long | 8 | 
| type | example | 
| char | %c | 
| short int | %hd | 
| int | %d | 
| long int | %ld | 
| float | %f | 
| double | %lf | 
| 字符串 | %s | 
原文:http://www.cnblogs.com/songyan-Z221/p/5820095.html