inttypes.h

int类型别名

 1 #include <stdio.h>
 2 #include <inttypes.h>
 3 
 4 #include <stdio.h>
 5 #include <inttypes.h>
 6 
 7 int  main(void)
 8 {
 9     int16_t a = 65535;
10     uint16_t b = 65535;
11 
12     int32_t c = 4294967295;
13     uint32_t d = 4294967295;
14 
15     int_least8_t e = 255;
16     uint_least8_t f = 255;
17 
18     int_fast8_t g = 255;
19     uint_fast8_t h = 255;
20 
21     printf("a = %" PRId16 "\n", a);
22     printf("b = %" PRId16 "\n", b);
23     printf("c = %" PRId32 "\n", c);
24     printf("d = %" PRId32 "\n", d);
25     printf("e = %" PRId8 "\n", e);
26     printf("f = %" PRId8 "\n", f);
27     printf("g = %" PRId8 "\n", g);
28     printf("h = %" PRId8 "\n", h);
29 
30     return 0;
31 }

 

posted @ 2014-08-17 21:48  挨踢淫才  阅读(1479)  评论(0编辑  收藏  举报