M
mdh
Starting Chapter 5 in K&R, and it does not get easier..but it is worth
it...I am repeatedly told!
K&R say that in the statement
p=&c;
"p is said to "point to c".
I know this will sound dumb, but no where does it say how the statement
is read...
Do you say "P equals alpha c" or do you read it just the way K&R say?
By the same token, how does one read this declaration?
int *ip;
K&R simply says /*** ip is a pointer to int **/
On a slightly more deeper note ( I hope)
Quote " the unary operators * and & bind more tightly then the
arithmetic operators" so the assignment
y = *ip + 10 etc etc
Does this mean that in the above expression, using
*ip or ip* would make no difference?
Lastly, K&R state "unary operators like ++ and * associate right to
left.
The example they use is (*ip)++. I do not quite understand how without
the parentheses, ip would be incremented. Could anyone throw some light
on this.
Again, as usual, thanks in advance for any enlightenment.
it...I am repeatedly told!
K&R say that in the statement
p=&c;
"p is said to "point to c".
I know this will sound dumb, but no where does it say how the statement
is read...
Do you say "P equals alpha c" or do you read it just the way K&R say?
By the same token, how does one read this declaration?
int *ip;
K&R simply says /*** ip is a pointer to int **/
On a slightly more deeper note ( I hope)
Quote " the unary operators * and & bind more tightly then the
arithmetic operators" so the assignment
y = *ip + 10 etc etc
Does this mean that in the above expression, using
*ip or ip* would make no difference?
Lastly, K&R state "unary operators like ++ and * associate right to
left.
The example they use is (*ip)++. I do not quite understand how without
the parentheses, ip would be incremented. Could anyone throw some light
on this.
Again, as usual, thanks in advance for any enlightenment.