In short, the standard doesn't guarantee it, the result is implementation-defined.
From the standard about sizeof
($5.3.3/1 Sizeof [expr.sizeof])
The sizeof operator yields the number of bytes in the object
representation of its operand.
and pointer is compound type ($3.9.2/1.3 Compound types [basic.compound])
pointers to void or objects or functions (including static members of
classes) of a given type, 8.3.1;
and ($3.9.2/3 Compound types [basic.compound])
The value representation of pointer types is implementation-defined.
even though ($3.9.2/3 Compound types [basic.compound])
Pointers to layout-compatible types shall have the same value
representation and alignment requirements (3.11).
but char
and int
don't need to have the same value representation. The starndard only says ($3.9.1/2 Fundamental types [basic.fundamental])
There are five standard signed integer types : “signed char”, “short
int”, “int”, “long int”, and “long long int”. In this list, each type
provides at least as much storage as those preceding it in the list.
and ($3.9.1/3 Fundamental types [basic.fundamental]) etc.
each signed integer type has the same object representation as its
corresponding unsigned integer type.