当前位置:网站首页>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
边栏推荐
- Regular expressions for judging positive integers
- Speculation on the way to realize the smooth drag preview of video editing software
- arcMap 发布切片服务
- ArcGIS JS API dojoconfig configuration
- Solve the problem of invalid listview Click
- Installation, use and problem summary of binlog2sql tool
- Why is PostgreSQL about to surpass SQL Server?
- Thoughts on the optimization of examination papers in the examination system
- Keysight has chosen what equipment to buy for you
- C1000k TCP connection upper limit test
猜你喜欢
The most detailed network counting experiment in history (2) -- rip experiment of layer 3 switch
Oracle配置st_geometry
Grafana 分享带可变参数的链接
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
Wechat video extraction and receiving file path
ArcMap publishing slicing service
Build intelligent garbage classification applet based on Zero
MySQL syntax collation (2)
2021-2022-2 ACM集训队每周程序设计竞赛(8)题解
Using oes texture + glsurfaceview + JNI to realize player picture processing based on OpenGL es
随机推荐
SSDB foundation 1
How to uninstall easyton
[play with lighthouse] Tencent cloud lightweight server builds a full platform video analysis video download website
Common processing of point cloud dataset
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)
命令-sudo
An example of using JNI to directly access surface data
Some ideas about time-consuming needs assessment
Switching power supply design sharing and power supply design skills diagram
Web Security
Prefer composition to inheritance
Application of DCT transform
How to select the third-party package of golang
The platinum library cannot search the debug process records of some projection devices
Problems caused by flutter initialroute and home
MySQL practical skills
MySQL syntax collation (2)
MySQL lock
On the forced conversion of C language pointer
Kubernetes入门到精通-KtConnect(全称Kubernetes Toolkit Connect)是一款基于Kubernetes环境用于提高本地测试联调效率的小工具。