u32 iterations = 5;
u32* ecx = (u32*)malloc(sizeof(u32) * iterations);
memset(ecx, 0xBAADF00D, sizeof(u32) * iterations);
printf("%.8X\n", ecx[0]);
ecx[0] = 0xBAADF00D;
printf("%.8X\n", ecx[0]);
free(ecx);
Run Code Online (Sandbox Code Playgroud)
非常简单地说,为什么我的输出如下?
0D0D0D0D
BAADF00D
Run Code Online (Sandbox Code Playgroud)
ps:u32是unsigned int的简单typedef
编辑: