当前位置:网站首页>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.
边栏推荐
- 淘宝商品详情页API接口、淘宝商品列表API接口,淘宝商品销量API接口,淘宝APP详情API接口,淘宝详情API接口
- SQLSTATE[HY000][1130] Host ‘host. docker. internal‘ is not allowed to connect to this MySQL server
- 上海字节面试问题及薪资福利
- What EDA companies are there in China?
- In memory, I moved from CSDN to blog park!
- 关于服装ERP,你知道多少?
- Differences and introduction of cluster, distributed and microservice
- Taobao store release API interface (New), Taobao oauth2.0 store commodity API interface, Taobao commodity release API interface, Taobao commodity launch API interface, a complete set of launch store i
- 集群、分布式、微服务的区别和介绍
- Ten stages of becoming a Senior IC Design Engineer. What stage are you in now?
猜你喜欢

Différenciation et introduction des services groupés, distribués et microservices

驱动开发中platform设备驱动架构详解

JD commodity details page API interface, JD commodity sales API interface, JD commodity list API interface, JD app details API interface, JD details API interface, JD SKU information interface

软件测试面试技巧

Lombok plug-in

TCC of distributed transaction solutions

消息队列:消息积压如何处理?

CVE-2021-3156 漏洞复现笔记

SAP webservice 测试出现404 Not found Service cannot be reached

5. 数据访问 - EntityFramework集成
随机推荐
Three level menu data implementation, nested three-level menu data
English grammar_ Noun possessive
常用消息队列有哪些?
Leetcode 1189 maximum number of "balloons" [map] the leetcode road of heroding
力扣102题:二叉树的层序遍历
zabbix_get测试数据库失败
[云原生]微服务架构是什么?
WEB架构设计过程
盘点国内有哪些EDA公司?
Web architecture design process
5. Data access - entityframework integration
2pc of distributed transaction solution
Message queue: how to deal with message backlog?
MySQL-CentOS7通过YUM安装MySQL
[daily training -- Tencent selected 50] 235 Nearest common ancestor of binary search tree
Go 語言的 Context 詳解
zabbix_ Get test database failed
CVE-2021-3156 漏洞复现笔记
SAP webservice 测试出现404 Not found Service cannot be reached
AI人脸编辑让Lena微笑