当前位置:网站首页>C语言的十六进制printf为何输出有时候输出带0xFF有时没有
C语言的十六进制printf为何输出有时候输出带0xFF有时没有
2022-04-23 19:24:00 【ToneChip】
unsigned short aaa = 0xC000;
printf("0x%x \n", (aaa << 8) );
输出 0xC00000
再写一个下面这种
short aaa = 0xC000;
printf("0x%x \n", (aaa << 8) );
输出:0xFFC00000
这是因为下面这个short定义的是一个带符号位的16Bit,左移之后,也是对应的带符号的int
版权声明
本文为[ToneChip]所创,转载请带上原文链接,感谢
https://tonechip.blog.csdn.net/article/details/121785366
边栏推荐
- @Analysis of conditional on Web Application
- 高层次人才一站式服务平台开发 人才综合服务平台系统
- Decompile and get the source code of any wechat applet - just read this (latest)
- openlayers 5.0 当地图容器大小改变时,重新加载地图
- SSDB foundation 1
- Wechat video extraction and receiving file path
- 深度学习——特征工程小总结
- Parsing headless jsonarray arrays
- MySQL restores or rolls back data through binlog
- 为何PostgreSQL即将超越SQL Server?
猜你喜欢

为何PostgreSQL即将超越SQL Server?

開關電源設計分享及電源設計技巧圖解

Wechat applet part of the mobile phone Preview PDF did not respond

2021-2022-2 ACM training team weekly Programming Competition (8) problem solution

OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!

I just want to leave a note for myself

NiO related Basics

mysql通过binlog恢复或回滚数据

JVM的类加载过程

binlog2sql 工具安装使用及问题汇总
随机推荐
Prefer composition to inheritance
Pdf reference learning notes
[play with lighthouse] Tencent cloud lightweight server builds a full platform video analysis video download website
js 计算时间差
[record] typeerror: this getOptions is not a function
Network protocol: SCTP flow control transmission protocol
How to use go code to compile Pb generated by proto file with protoc Compiler Go file
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)
山大网安靶场实验平台项目-个人记录(五)
Audio signal processing and coding - 2.5.3 the discrete cosine transform
How to select the third-party package of golang
为何PostgreSQL即将超越SQL Server?
開關電源設計分享及電源設計技巧圖解
@Analysis of conditional on Web Application
Hot reload debugging
高层次人才一站式服务平台开发 人才综合服务平台系统
JS to get the local IP address
[报告] Microsoft :Application of deep learning methods in speech enhancement
openlayers draw矩形
Thoughts on the optimization of examination papers in the examination system