+ 2
Could someone tell.....
what is the diffrence between those two codes: ♦first: int var=5; cout<<&var; ♦second: int var=5; int*p; p=&var; cout<<p; is it always necessary to declare a pointer in order to access the adress of var? can we access it without using any pointers?? as we did in the 1st one?? what is the difference?
4 Respuestas
+ 4
there is no difference in the output but
first :- there is no usage of memory.
second:- there is usage of memory bcoz it will store the (var) and also store *p which makes more memory compare to
first one
+ 2
your welcome anytime
+ 1
@Yesh thank you
+ 1
thanx