当前位置:网站首页>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
边栏推荐
- 5 minutes to achieve wechat cloud applet payment function (including source code)
- SQL常用的命令
- Using oes texture + glsurfaceview + JNI to realize player picture processing based on OpenGL es
- [报告] Microsoft :Application of deep learning methods in speech enhancement
- [transfer] summary of new features of js-es6 (one picture)
- ArcMap connecting ArcGIS Server
- openlayers 5.0 当地图容器大小改变时,重新加载地图
- UML类图几种关系的总结
- MySQL syntax collation (3)
- Openlayers 5.0 loading ArcGIS Server slice service
猜你喜欢
[报告] Microsoft :Application of deep learning methods in speech enhancement
Zero base to build profit taking away CPS platform official account
Zero cost, zero foundation, build profitable film and television applet
ArcMap连接 arcgis server
MySQL syntax collation (5) -- functions, stored procedures and triggers
Is meituan, a profit-making company with zero foundation, hungry? Coupon CPS applet (with source code)
The most detailed network counting experiment in history (2) -- rip experiment of layer 3 switch
MySQL syntax collation (4)
深度学习——特征工程小总结
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
随机推荐
Oracle配置st_geometry
该买什么设备,Keysight 给你挑好了
Codeforces Round #784 (Div. 4)
Openlayers 5.0 loading ArcGIS Server slice service
MySQL syntax collation (3)
Machine learning catalog
Use of fluent custom fonts and pictures
坐标转换WGS-84 转 GCJ-02 和 GCJ-02转WGS-84
Kubernetes入门到精通-在 Kubernetes 上安装 OpenELB
No, some people can't do the National Day avatar applet (you can open the traffic master and earn pocket money)
js上传文件时控制文件类型和大小
Solve the problem of invalid listview Click
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)
为何PostgreSQL即将超越SQL Server?
Coordinate conversion WGS-84 to gcj-02 and gcj-02 to WGS-84
Codeforces Round #783 (Div. 2) D题解
Customize the non slidable viewpage and how to use it
Redis core technology and practice 1 - start with building a simple key value database simplekv
Transaction processing of SQL Server database
浅谈c语言指针的强制转换