摘要: 2013-08-2216:07:35第五课 - const和volatile分析const修饰变量---原来const不是真的常量在C语言中const修饰的变量是只读的,其本质还是变量const修饰的变量会在内存占用空间本质上,const只对对编译器有用,在运行时无用const修饰数组在C语言中const修饰的数组是只读的const修饰的数组空间不可被改变1constintA[5] = {1,2,3,4,5};2 int* p = (int*)A;3 4 int i = 0;5 6 for( i = 0;i 2 #include 3 /*通过指针,修改const定义的“常量”*/ 4 int 阅读全文
posted @ 2013-08-10 20:56 电子木木 阅读(447) 评论(0) 推荐(0) 编辑