Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

node example. What is pointing? Is it a pointer, reference, value?

http://beastie.cs.ua.edu/cs150/book/index_16.html


I do not fully understand nodes

I am trying to debug code and look at pictures of pointing
but I can not understand how a variable is pointed to another location (value, reference)
SOLUTION
Avatar of Anwar Saiah
Anwar Saiah

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgb192

ASKER

aboo_s

is red pointing to value or reference or pointer of blue

pepr
This is what is called reference -- the reference value (the address) is used behind the scene to get to the target.

If a programming language makes the indirect access to the target object via its address visible, then we say we work with pointers. The target is also accessed indirectly,
is a pointer a reference pointing to a node

The [4, [3, [2, [1, None]]]] is actually something like:
is this a list, tuple
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgb192

ASKER


But those that do support references always require that the reference is always filled with value to some existing objects (i.e. some address). Pointers on the other hand can contain a special value named nil, NULL, nullptr or the like that says "pointing to nowhere".

so now I know one difference between pointer and reference

thanks