当前位置:网站首页>Classic questions about data storage
Classic questions about data storage
2022-07-07 05:51:00 【It's Yi'an】
1. Ask about the output
#include<stdio.h>
#include<windows.h>
int main(void) {
unsigned int b = 5;
for (b = 9; b >= 0; b--) {
printf("%u\n", b);
Sleep(500);
}
return 0;
}
Notice here that b It's unsigned , Its value has been 0-->2^32-1 Between the circulation , The program will enter an infinite loop after running .
2. Ask about the output
#include<stdio.h>
#include<string.h>
int main(void) {
char a[1000];
int i = 0;
for (i = 0; i < 1000; i++) {
a[i] = -1 - i;
}
printf("%d\n", strlen(a));
return 0;
}
Here is a question of scope ,char The signed range of types is -128-->127,strlen The function is looking for in the string '\0', Find one i, When it is put into char In Chinese, it means -1 when , The result is 0,, Its value is 255.
边栏推荐
- 微信小程序蓝牙连接硬件设备并进行通讯,小程序蓝牙因距离异常断开自动重连,js实现crc校验位
- On the difference between FPGA and ASIC
- zabbix_ Get test database failed
- 消息队列:重复消息如何处理?
- 产业金融3.0:“疏通血管”的金融科技
- Mapbox Chinese map address
- [reading of the paper] a multi branch hybrid transformer network for channel terminal cell segmentation
- 分布式事务解决方案之TCC
- 分布式全局ID生成方案
- "Multimodal" concept
猜你喜欢
产业金融3.0:“疏通血管”的金融科技
EMMC打印cqhci: timeout for tag 10提示分析与解决
【日常训练--腾讯精选50】235. 二叉搜索树的最近公共祖先
SQL query: subtract the previous row from the next row and make corresponding calculations
分布式事务解决方案之TCC
Pinduoduo product details interface, pinduoduo product basic information, pinduoduo product attribute interface
不同网段之间实现GDB远程调试功能
2pc of distributed transaction solution
架构设计的五个核心要素
Web authentication API compatible version information
随机推荐
zabbix_ Get test database failed
Reading the paper [sensor enlarged egocentric video captioning with dynamic modal attention]
目标检测中的BBox 回归损失函数-L2,smooth L1,IoU,GIoU,DIoU,CIoU,Focal-EIoU,Alpha-IoU,SIoU
Paper reading [MM21 pre training for video understanding challenge:video captioning with pre training techniqu]
Common skills and understanding of SQL optimization
Realize GDB remote debugging function between different network segments
拼多多商品详情接口、拼多多商品基本信息、拼多多商品属性接口
Reptile exercises (III)
JVM the truth you need to know
On the difference between FPGA and ASIC
数据中心为什么需要一套基础设施可视化管理系统
make makefile cmake qmake都是什么,有什么区别?
EMMC打印cqhci: timeout for tag 10提示分析与解决
Polynomial locus of order 5
nVisual网络可视化
mac版php装xdebug环境(m1版)
R语言【逻辑控制】【数学运算】
Mysql-centos7 install MySQL through yum
Reading notes of Clickhouse principle analysis and Application Practice (6)
Nodejs get client IP