2022.2.28 const的运用

const的运用

#include <stdio.h>

int main()

{

const int num=4;

num=8;

printf("%d\n",num);

}

结果运行不了,因为const是常属性,不可发生改变;num=8运行不了

posted @ 2022-02-28 17:12  抢你红包  阅读(23)  评论(0)    收藏  举报