const关键字的作用 C 里const int* 与int const* 有什么区别?

C 里const int* 与int const* 有什么区别?首先,如果const int是整数常量,那么指针P可以更改,但是*P不能更改。第二:const*是一个常量索引,那么指针P是不可变的,

C 里const int* 与int const* 有什么区别?

首先,如果const int是整数常量,那么指针P可以更改,但是*P不能更改。

第二:const*是一个常量索引,那么指针P是不可变的,但是*P可以更改。

我在编程中从不使用const作为关键字,以免弄巧成拙。

关键字有哪些?

关键字是计算机语言中预定义的有意义的标识符,有时称为保留字。系统定义以下关键字:

const(constant)dim(definition)as(MOD)

and(and)or(or)not(not)

if(then)else(否则)

stop(end)

Select(case)is(yes)

for(count)to(step)

byref(address)ByVal

sub(subroutine)function exit

do(loop)until(除非)while(wend)let(let)call(call)

REM(comment)

integer(integer)long(long integer)single(单精度十进制)double(双精度十进制)Boolean(布尔)[字符串(文本)

me(I)private(私有)public(公共)