0

why we have to know the address of store varable,whats the aim of finding its adress,what we will do with its address?

24th Dec 2016, 11:08 AM
Aqib Asmat
Aqib Asmat - avatar
4 odpowiedzi
+ 2
Hi! We have not to know the address of variable. The compiler have to. So, get value of the variable by address is easier than looking for it by id for system. For example, suggest you have some houses. And try to find it by description(red, blue, yellow, stone). Then try to find house by address. It's too much easier, isn't it?)
24th Dec 2016, 11:15 AM
Dmitry Pudov
Dmitry Pudov - avatar
+ 2
We dont have to find out its address, but it can help us to do some stuff like swaping variables data
24th Dec 2016, 11:35 AM
Wen Qin
Wen Qin - avatar
0
then we use &?
24th Dec 2016, 11:16 AM
Aqib Asmat
Aqib Asmat - avatar
0
Yes, of course. Compiler takes & and momentally finds the variable. It takes less RAM and time also.
24th Dec 2016, 11:18 AM
Dmitry Pudov
Dmitry Pudov - avatar