65,211
社区成员
发帖
与我相关
我的任务
分享
#define NUM 10 //简单的名字替换,写啥都可以,预编译时
const int NUM=10//要做类型检查,编译时
#include <stdio.h>
void main()
{
const int NUM = 10;
printf( "%d\n", NUM );
printf( "%x\n", &NUM );
*((int *)&NUM) = 11;
printf( "%d\n", NUM );
printf( "%x\n", &NUM );
}