当前位置:网站首页>Why is the hexadecimal printf output of C language sometimes with 0xff and sometimes not
Why is the hexadecimal printf output of C language sometimes with 0xff and sometimes not
2022-04-23 19:29:00 【ToneChip】
unsigned short aaa = 0xC000;
printf("0x%x \n", (aaa << 8) );
Output 0xC00000
Write another one like this
short aaa = 0xC000;
printf("0x%x \n", (aaa << 8) );
Output :0xFFC00000
This is because of the following short What is defined is a signed bit 16Bit, After moving left , It is also the corresponding signed int
版权声明
本文为[ToneChip]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231923488824.html
边栏推荐
- FFT物理意义: 1024点FFT就是1024个实数,实际进入fft的输入是1024个复数(虚部为0),输出也是1024个复数,有效的数据是前512个复数
- Kubernetes入门到精通-在 Kubernetes 上安装 OpenELB
- SQL Server database in clause and exists clause conversion
- openlayers draw矩形
- Steps to build a deep learning environment GPU
- C学习完结
- 优先使用组合而不使用继承
- Grafana 分享带可变参数的链接
- How to select the third-party package of golang
- MySQL lock
猜你喜欢

指针数组与数组指针的区分

MySQL syntax collation (2)

MFCC: Mel频率倒谱系数计算感知频率和实际频率转换

Why is PostgreSQL about to surpass SQL Server?

The most detailed network counting experiment in history (2) -- rip experiment of layer 3 switch

RuntimeError: Providing a bool or integral fill value without setting the optional `dtype` or `out`

Grafana 分享带可变参数的链接

命令-sudo

Audio signal processing and coding - 2.5.3 the discrete cosine transform
![[webrtc] add x264 encoder for CEF / Chromium](/img/3f/9bf73d6d2aec14ba94dfc6734eb6ac.png)
[webrtc] add x264 encoder for CEF / Chromium
随机推荐
数据库查询 - 选课系统
Main differences between go and PHP
How to use go code to compile Pb generated by proto file with protoc Compiler Go file
MySQL syntax collation (4)
openlayers draw矩形
【webrtc】Add x264 encoder for CEF/Chromium
Openlayers draw rectangle
Solve the problem of invalid listview Click
IIS数据转换问题16bit转24bit
Easy mock local deployment (you need to experience three times in a crowded time. Li Zao will do the same as me. Love is like a festival mock)
优先使用组合而不使用继承
MySQL syntax collation (3)
Common SQL commands
Codeworks round 783 (Div. 2) d problem solution
对普通bean进行Autowired字段注入
Hot reload debugging
Zero base to build profit taking away CPS platform official account
指针数组与数组指针的区分
考试系统进入试卷优化思路
The difference between underline and dot of golang import package