I see two option to assign a pointer
1.
int p=5;
int *r=&p
2.
int p
int *r;
r=&p;
Why do they use in 1 with asterisk and in two without?
You should read this:
int *r [...]
as:
(int *) r [...]
The type of r is int *. If you look at it that way, you'll see that both versions are identical.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With