前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >printf打印(u8/.../int/.../float)各类型方法

printf打印(u8/.../int/.../float)各类型方法

作者头像
玖柒的小窝
修改2021-09-15 11:40:32
1.2K0
修改2021-09-15 11:40:32
举报
文章被收录于专栏:各类技术文章~各类技术文章~

给出打印格式:

给出定义类型:

代码语言:javascript
复制
 1 /* bsd */
 2 typedef unsigned char        u_char;
 3 typedef unsigned short       u_short;
 4 typedef unsigned int         u_int;
 5 typedef unsigned long        u_long;
 6 
 7 /* sysv */
 8 typedef unsigned char        unchar;
 9 typedef unsigned short       ushort;
10 typedef unsigned int         uint;
11 typedef unsigned long        ulong;
12 
13 #ifndef __BIT_TYPES_DEFINED__
14 #define __BIT_TYPES_DEFINED__
15 
16 typedef        __u8                u_int8_t;
17 typedef        __s8                int8_t;
18 typedef        __u16        u_int16_t;
19 typedef        __s16        int16_t;
20 typedef        __u32        u_int32_t;
21 typedef        __s32        int32_t;
22 
23 #endif /* !(__BIT_TYPES_DEFINED__) */
24 
25 typedef        __u8                uint8_t;
26 typedef        __u16          uint16_t;
27 typedef        __u32        uint32_t;
28 
29 #if defined(__GNUC__)
30 typedef        __u64        uint64_t;
31 typedef        __u64        u_int64_t;
32 typedef        __s64        int64_t;
33 
34 typedef signed char s8;  
35 typedef unsigned char u8;  
36   
37 typedef signed short s16;  
38 typedef unsigned short u16;  
39   
40 typedef signed int s32;  
41 typedef unsigned int u32;  
42   
43 typedef signed long long s64;  
44 typedef unsigned long long u64;     

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档