当前位置:网站首页>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
边栏推荐
- Codeworks round 783 (Div. 2) d problem solution
- Command - sudo
- C6748 软件仿真和硬件测试 ---附详细FFT硬件测量时间
- Strange problems in FrameLayout view hierarchy
- filebeat、logstash配置安装
- 什么是消息队列
- Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies
- Openharmony open source developer growth plan, looking for new open source forces that change the world!
- The difference between underline and dot of golang import package
- Common processing of point cloud dataset
猜你喜欢
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
Wechat applet part of the mobile phone Preview PDF did not respond
Intuitive understanding of the essence of two-dimensional rotation
NiO related Basics
Oracle configuration st_ geometry
White screen processing method of fulter startup page
5 minutes to achieve wechat cloud applet payment function (including source code)
优先使用组合而不使用继承
命令-sudo
An algorithm problem was encountered during the interview_ Find the mirrored word pairs in the dictionary
随机推荐
机器学习目录
Reflection on the performance of some OpenGL operations in the past
The usage of slice and the difference between slice and array
All table queries and comment description queries of SQL Server
考试系统进入试卷优化思路
Decompile and get the source code of any wechat applet - just read this (latest)
Redis core technology and practice 1 - start with building a simple key value database simplekv
Go three ways to copy files
SQL Server database in clause and exists clause conversion
Zero cost, zero foundation, build profitable film and television applet
ArcMap connecting ArcGIS Server
Zero base to build profit taking away CPS platform official account
Go recursively loops through folders
Openharmony open source developer growth plan, looking for new open source forces that change the world!
The difference between underline and dot of golang import package
视频理解-Video Understanding
C6748 软件仿真和硬件测试 ---附详细FFT硬件测量时间
优先使用组合而不使用继承
Customize the non slidable viewpage and how to use it
Pdf reference learning notes