
授人以渔,不授人以鱼。
程序代码:#include <stdio.h>
#include "string.h"
int main()
{
char *str=NULL;
int *p=NULL;
// int a;
// printf("%p ",&a); 测试当前程序变量可用的地址
str=(char*)0xFA65;
printf("%p ", str);
// p=(int*)str;
p=(int*)0x0012FF3C;
printf("%p ", p);
memcpy(p, "123", 3);
// *p = 12;
printf("%d\n", *p);
return 0;
}
