Pointers Overview and Need

From WikiEducator
Jump to: navigation, search

We declare simple variables in C++ by the statements like :
int a ; // an un-initialized integer variable
float b ; // an un-initialized float variable
char MyVote = ‘Y’ ; // a initialized character variable

All of the above variables that we have declared are termed as simple programming variables (You learned about them in Class XI).The concept of pointer is not new in C++, it has been there in right from the generation of Language – C. Language C is considered as one of the most efficient middle level programming language, because of its ability to write codes for hardware devices, like CPU , Disk Drives, Keyboards etc.One of the facilities in C which provided it these capabilities was the presence of Pointers with it.

Following are some of the application area domains where a Pointer concept could be applied:

  1. Writing Device Drivers (a middle ware).
  2. Communicating with Network and I/O devices.
  3. Implementing complex Data Structures Like Stack ,Link – List , Queue etc.(which you will read after this chapter)
  4. Implementing many complex algorithms faster.