Breaking News

An Introduction to Pointer In C++

Pointers are variables that store memory address. This address is the address of another variable.
 
You know that variables are stored in memory spaces. Memory spaces are bytes.
 
For information, 8 bits make up one byte. Bits stands for Binary digits. A binary digit is a one or a zero. You have only one’s and zeroes. You may remember that a character means it requires one byte, an integer two etc……
 
Every byte will have its own address. In computers the address is a hexadecimal number.
 
For example: 0X8566fff4 is a hexadecimal number representing an address. Hence when we say that values of variables are stored in the computer, we actually mean that the value has been stored in a particular address.
 
The ‘address of ‘ operator is denoted by ‘&’. This can be applied to any variable as illustrated below:
 
 
Out put of the program
 
 
The concept of OOPs (Object Oriented Programming) makes emphasis on making decisions during run time rather than compile time. Run time is the time when someone runs your program. Compile time is the time at which you compile the program.
 

Check Also

Insertion & Extraction In C++

Insertion is the operation of sending characters to a stream, expressed by the overloaded insertion …