当前位置:网站首页>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.
边栏推荐
- Flinksql 读写pgsql
- 拼多多商品详情接口、拼多多商品基本信息、拼多多商品属性接口
- CVE-2021-3156 漏洞复现笔记
- 原生小程序 之 input切换 text与password类型
- Web Authentication API兼容版本信息
- Educational Codeforces Round 22 B. The Golden Age
- Industrial Finance 3.0: financial technology of "dredging blood vessels"
- Five core elements of architecture design
- Go language context explanation
- Opensergo is about to release v1alpha1, which will enrich the service governance capabilities of the full link heterogeneous architecture
猜你喜欢
CVE-2021-3156 漏洞复现笔记
Five core elements of architecture design
404 not found service cannot be reached in SAP WebService test
SAP ABAP BDC (batch data communication) -018
What is dependency injection (DI)
分布式事务解决方案之2PC
5. Data access - entityframework integration
消息队列:如何确保消息不会丢失
[云原生]微服务架构是什么?
What is message queuing?
随机推荐
Opensergo is about to release v1alpha1, which will enrich the service governance capabilities of the full link heterogeneous architecture
The 2022 China low / no code Market Research and model selection evaluation report was released
京东商品详情页API接口、京东商品销量API接口、京东商品列表API接口、京东APP详情API接口、京东详情API接口,京东SKU信息接口
MySQL-CentOS7通过YUM安装MySQL
PTA 天梯赛练习题集 L2-003 月饼 测试点2,测试点3分析
消息队列:如何确保消息不会丢失
基于NCF的多模块协同实例
分布式事务解决方案之TCC
5. 数据访问 - EntityFramework集成
Dynamic memory management
Mapbox Chinese map address
【日常训练--腾讯精选50】292. Nim 游戏
Input of native applet switches between text and password types
Flink SQL realizes reading and writing redis and dynamically generates hset key
消息队列:重复消息如何处理?
Paper reading [MM21 pre training for video understanding challenge:video captioning with pre training techniqu]
Paper reading [open book video captioning with retrieve copy generate network]
Leetcode 1189 maximum number of "balloons" [map] the leetcode road of heroding
Paper reading [semantic tag enlarged xlnv model for video captioning]
ForkJoin最全详解(从原理设计到使用图解)