We all know that dereferencing an null pointer or a pointer to unallocated memory invokes undefined behaviour.
But what is the rule when used within an expression pa
sizeof(*ptr) is the same as sizeof(int) in this case.
sizeof(*ptr)
sizeof(int)