一.三个实验
1、直接对const变量修改
#include <stdio.h>
int main()
{
const int a = 10;
a = 1;
printf("a=%d",a);
}
还没有执行./xxx运行呢,编译就出错了。
2、const变量通过指针修改试验
#include <stdio.h>
一.三个实验
1、直接对const变量修改
#include <stdio.h>
int main()
{
const int a = 10;
a = 1;
printf("a=%d",a);
}
还没有执行./xxx运行呢,编译就出错了。
2、const变量通过指针修改试验
#include <stdio.h>