随笔分类 -  C++

c++学习过程中的随笔
摘要:牛客题目: 点击查看代码 const int a =10; int *p=(int*)(&a); *p=20; cout<<"a="<<a<<",*p="<<*p<<endl; 输出:a=10,*p=20; 原因: a = 10, *p = 20 因为使用const 编译器会优化,对于以后见到a , 阅读全文
posted @ 2022-03-09 10:27 TomoyaAT 阅读(49) 评论(0) 推荐(0)