#include <stdio.h>
#include <stdlib.h>
int main() {
char* ptr0 = (char*)malloc(sizeof(10));
*(char**)(ptr0) = ptr0; //若去掉这行,则不crash。为啥?
free(ptr0);
return 0;
}
相关问题
- Multiple sockets for clients to connect to
- What is the best way to do a search in a large fil
- glDrawElements only draws half a quad
- Index of single bit in long integer (in C) [duplic
- Equivalent of std::pair in C
你比比sizeof(10)和sizeof(char *)哪个大