主页
C 语言
C 访问内存
demo_memory_access2
运行 ❯
×
更改方向
保存代码
更改主题
#include
#include
int main() { int *ptr1 = malloc(4); char *ptr2 = (char*) ptr1; ptr1[0] = 1684234849; printf("%d is %c %c %c %c", *ptr1, ptr2[0], ptr2[1], ptr2[2], ptr2[3]); return 0; }
1684234849 is a b c d