"All pointers share the same data type - a long hexadecimal number..." | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

"All pointers share the same data type - a long hexadecimal number..."

Please explain that line from the course.

19th Jul 2016, 8:02 AM
Anik Sarker
Anik Sarker - avatar
3 Answers
+ 4
all locations of variables are made of a long hexadecimal number. (i.e. 0x12345678) pointers contain locations of variables. so pointers contain a long hexadecimal number.
19th Jul 2016, 9:51 AM
_Geometry dash_ _Roh_ (AKA NovaRate0315)
_Geometry dash_ _Roh_ (AKA NovaRate0315) - avatar
+ 4
the pointer contains this lonely information : the address to the pointed element. In programming, addresses are not string like "3rd street, lovely blue house n°42, San Fransisco" but numbers. hexadecimal is just a trick to display that number being the closest to binary but in a shortest way. "Long" is for being less limited than just "int".
19th Jul 2016, 9:56 AM
Dorian
+ 2
Oh! Thanks.
19th Jul 2016, 11:07 AM
Anik Sarker
Anik Sarker - avatar