C++ Pointer and Address Of


  • Pointer: pointing a variable by reference
    • closely related with arrays and strings
    • pointer variables :
      • refers to  the address of an object like variable, stored in a specific memory location.
  • We can set pointer to any data type.
    • can initialized to 0, NULL, or an address
    • pointing to 0 or NULL will refer to NOTHING.
  • Code : myPointer1.txt

Step: 1 Create project

Name the project as "myPointer1"

Project is created

Step: 2 Add a source file

Step: 3 Edit the code

Step: 4 Runtimes View