나는 내가 많은 장소 sizeof(*pointer)
의 사용에서 관찰 한 리눅스에서 다음 프로그램차이 (* PTR)과는 sizeof (구조체)
struct temp{
int ab;
int cd;
};
int main(int argc, char **argv)
{
struct temp *ptr1;
printf("Sizeof(struct temp)= %d\n", sizeof(struct temp));
printf("Sizeof(*ptr1)= %d\n", sizeof(*ptr1));
return 0;
}
출력
Sizeof(struct temp)= 8
Sizeof(*ptr1)= 8
을 시도했다. 둘 다 동일하면 왜 sizeof(*pointer)
이 사용됩니까 ??