我很困惑为什么这段代码会导致段错误
int array[] = {1, 2}; void** ptr = (void**) &array; printf("%d", *(int*)ptr[0]);
我希望它打印存储在 array[0] 中的 int,但它却出现段错误。
c
c ×1