4
I’m having a doubt in the interpretation (the way I read my code) on pointer assignments in the C language.
I did not understand the logic of the following assignments:
"If i
and j
are whole variables and p
and q
pointers to int
, which of the following attribution expressions are illegal?"
Statement of the financial year:
a) p = &i;
b) *q = &j;
c) p = &*&i;
d) i = (*&)j;
e) i = *&j;
f) i = *&*&j;
g) q = *p;
h) i = (*p)++ + *q;
I am in doubt in items C, D, E and F, because I did not understand the logic of the following attributions... A, B, G and H I have no doubt in the assignments, only those using "*&var".
How do I interpret these assignments in C?
Take a look at [tour]. You can accept an answer if it solved your problem. You can vote on every post on the site as well. Did any help you more? You need something to be improved?
– Maniero