当前位置:网站首页>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
边栏推荐
- @Mapperscan and @ mapper
- Data analysis learning directory
- ESP8266-入门第一篇
- First experience of using fluent canvas
- Kubernetes入门到精通-KtConnect(全称Kubernetes Toolkit Connect)是一款基于Kubernetes环境用于提高本地测试联调效率的小工具。
- openlayers 5.0 热力图
- 命令-sudo
- Audio signal processing and coding - 2.5.3 the discrete cosine transform
- Go recursively loops through folders
- Speculation on the way to realize the smooth drag preview of video editing software
猜你喜欢
C6748 软件仿真和硬件测试 ---附详细FFT硬件测量时间
Prefer composition to inheritance
Decompile and get the source code of any wechat applet - just read this (latest)
命令-sudo
精简CUDA教程——CUDA Driver API
An idea of rendering pipeline based on FBO
ArcMap connecting ArcGIS Server
@MapperScan与@Mapper
RuntimeError: Providing a bool or integral fill value without setting the optional `dtype` or `out`
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
随机推荐
Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies
The platinum library cannot search the debug process records of some projection devices
什么是消息队列
[report] Microsoft: application of deep learning methods in speech enhancement
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
JVM的类加载过程
Codeforces Round #784 (Div. 4)
SSDB foundation 2
White screen processing method of fulter startup page
优先使用组合而不使用继承
Quick start to static class variables
命令-sudo
Class loading mechanism
【webrtc】Add x264 encoder for CEF/Chromium
Thoughts on the optimization of examination papers in the examination system
Openharmony open source developer growth plan, looking for new open source forces that change the world!
Wechat applet part of the mobile phone Preview PDF did not respond
Modify the font size of hint in editext
LPC1768 关于延时Delay时间与不同等级的优化对比
SQL Server database in clause and exists clause conversion