-moz-user-select:none; -webkit-user-select:none; -khtml-user-select:none; -ms-user-select:none; user-select:none;

Monday, 28 September 2015

Example of pointers in C++

As we know that a pointer is a variable whose value is the address of another variable. To demonstrate it,consider the following example.


Source code


#include <iostream>

using namespace std;

int main ()

{

   int  var1;

   cout << "Address of var1 variable: ";

   cout << &var1 << endl;

   return 0;

}

Output


Example of pointer
Example of pointer


Reference


To know the reference of this blog,

No comments:

Post a Comment