当前位置:网站首页>DAY 3 数组,前置后置,字符空间,关键词和地址指针
DAY 3 数组,前置后置,字符空间,关键词和地址指针
2022-06-26 09:34:00 【51CTO】
1.不能用变量来指定数组的大小
例:
int a=10;
int arr[a]={0};
此程序是错误的。



由以上可见,空格和默认添加的“\d”也分别算一个字符。但是注意的是"\0"不算字符串的长度。但空格算一个字符。
2.求字符所占空间

3.前置和后置

4.关键词

struct 结构体关键字
union 联合体/共用体
typedef 类型定义
static int a 静态的局部变量a,修饰局部变量时,会使局部变量的生命周期变长了
不使用static时:

使用static时:

static 修饰全局变量时,会改变全局变量的作用域,使全局变量只能在其所在的源文件中使用。
例如:
在源文件test_1中:
int change_1=25;
在源文件test_2中:
extern int chang_1
此时chang_1可以在test_2中使用,但如果是
static int change_1=25;
此时chang_1不可以在test_2中使用
5.#define定义常量和宏

6.地址指针

边栏推荐
- 我的创作纪念日
- Joint Noise-Tolerant Learning and Meta Camera Shift Adaptation for Unsupervised Person Re-ID
- Edge computing is the sinking and extension of cloud computing capabilities to the edge and user sides
- Summary of common commands of vim
- How about the security of flush stock trading software? How to open an account in flush
- Vscode common programming fonts
- logback
- 2021-11-29 quintic polynomial of trajectory planning
- 力扣------从数组中移除最大值和最小值
- What you need to know to test -- URL, weak network, interface, automation
猜你喜欢

logback

2021-11-29 轨迹规划五次多项式

online trajectory generation

計算領域高質量科技期刊分級目錄

Kubernetes cluster deployment (v1.23.5)

Explained: A Style-Based Generator Architecture for GANs (StyleGAN)

Cancellation and unbinding of qiniu cloud account

Thinkphp5 manual error reporting

我的创作纪念日

PHP extracts TXT text to store the domain name in JSON data
随机推荐
PHP does not allow images to be uploaded together with data (no longer uploading images before uploading data)
Creation and use of XSync synchronization script (taking debian10 cluster as an example)
How to view the data mini map quickly and conveniently after importing data in origin
LeetCode 0710.黑名单中的随机数 - 预处理实现O(1)取值
【CVPR 2021】Unsupervised Multi-Source Domain Adaptation for Person Re-Identification (UMSDA)
Mysql database field query case sensitive setting
LeetCode 958. 二叉树的完全性校验
Notes on sports planning on November 22, 2021
Joint Noise-Tolerant Learning and Meta Camera Shift Adaptation for Unsupervised Person Re-ID
[trajectory planning] testing of ruckig Library
How does flutter transfer parameters to the next page when switching pages?
A concise tutorial for getting started with go generics
2021-11-29 quintic polynomial of trajectory planning
Classified catalogue of high quality sci-tech periodicals in the field of computing
Several connection query methods of SQL (internal connection, external connection, full connection and joint query)
How to create an IE tab in edge browser
Click the mask layer to close the pop-up window
Redis notes (16) - info instructions and command line tools (view memory, status, number of client connections, monitoring server, scan large keys, sampling server, execute batch commands, etc.)
Redis novice introduction
节流,防抖,new函数,柯里化