Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1722968
  • 博文数量: 143
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1462
  • 用 户 组: 普通用户
  • 注册时间: 2016-08-23 11:14
文章分类

全部博文(143)

文章存档

2022年(3)

2021年(13)

2020年(21)

2019年(8)

2018年(28)

2017年(7)

2016年(63)

我的朋友

分类: LINUX

2020-09-27 18:44:12

实验:

点击(此处)折叠或打开

  1. #include <stdio.h>
  2. #include <stdint.h>

  3. int main ( void )
  4. {
  5.     uint64_t udata = 0x123456789ULL;

  6.     printf("0x%llx\n", udata);
  7.     printf("%#llx\n", udata);

  8.     printf("%#08llx\n", udata);
  9.     printf("%#016llx\n", udata);

  10.     printf("0x%016llx\n", udata);
  11.     printf("%#018llx\n", udata);
  12. }

输出:

点击(此处)折叠或打开

  1. 0x123456789
  2. 0x123456789
  3. 0x123456789
  4. 0x00000123456789
  5. 0x0000000123456789
  6. 0x0000000123456789

阅读(5020) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~