Wednesday, June 28, 2023

C++ : POINTERS

A pointer is an integer that stores the memory address.



Consider  a single street, with houses on one side from start to end.
Memory in a computer is just like this street, its an one dimmensional array/line, with a sequence of byte arranged in that 1D array. So one byte is equivallent to one house.

Now each house will have an address. If someone want to post a gift to a particular house you need an address to that house. Similarly for writting / reading from memory you need the address to that particular byte. This address is held by the pointer.

Please check documentation folder in project below :