英文 版c语言笔记题,c语言笔记(国外英文资料).doc

c语言笔记(国外英文资料)

c语言笔记(国外英文资料)

Getchar ();

Gets (name []); / / getchar is used to clear the unused characters of the last data entry (including the \ n return space);

The pointer points to the difference between an integer array and a character array:

Char a [5], [10]; P is equal to a [0]. Char a, [5]. P = & a [0];

Int a [5] [5]; P is equal to a [0]. Int a, [5]. P = a;

The pointer points to the difference between an int two-dimensional array and a char two-dimensional array:

Int a [5]. P is equal to a [0]. When used, the whole range is * p ~ * (p + 24). 25 (integer)

Char a [5], [5]; P = a; When used, the entire array range is p ~ p + 4; (5 strings, p: char (* p) [6] an array pointer)

Pointer array and one-dimensional array pointer: char STR [5]. P = STR. (pointer to a one-dimensional array)

Char STR [5]. P [I] = STR [I] (pointer array, I = 0 ~ 4)

Emphasis: the two-dimensional array name is pointing to the row, and 1 in a + 1 represents the number of bytes in a row of all elements.

An array name points to the column, a [0];

Char STR [5], [10]; Char (* p) [10]; P = STR. When making a function call, the function declaration section cannot be omitted from [10], such as: void hs (char * [10])

Char sta [20]. P = STR. Gets (p); , gets (STR); Can be fixed.

Summary of Pointers:

The pointer is the address, where the "pointer" can be used instead of the "address", and the pointer to the variable is the address of the variable

Distinguish pointer and pointer variables:

Pointer: a pointer is an address, such as the address of a variable in 2008, which is a pointer to a variable

Pointer variable: the value of a pointer variable is an address

Pointing: the address means pointing to a specific object through the address

For pointer variables, you put the address in a variable, and this pointer points to whom

Data objects in memory is allocated space, also have the address, also has a pointer, you can define some pointer variable to store the address of the data object

Void * is a special pointer t

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值