Jin Jin - 3 months ago 16
C Question

Can we say that a pointer value designates an object?

For example,

int a = 10;


Obviously,
a
designates
int
object which stores
10
. But is it true to say that
&a
designates an object? Since
&a
is an address value, I think it designates one byte object in memory!

M.M M.M
Answer

In the C Standard's terminology, lvalue expressions can designate a memory location. &a is not an lvalue so it does not designate anything.

Comments