2022.2.28 const的运用
const的运用
#include <stdio.h>
int main()
{
const int num=4;
num=8;
printf("%d\n",num);
}
结果运行不了,因为const是常属性,不可发生改变;num=8运行不了
const的运用
#include <stdio.h>
int main()
{
const int num=4;
num=8;
printf("%d\n",num);
}
结果运行不了,因为const是常属性,不可发生改变;num=8运行不了