C++ Pointer address operator in front of a variable's name to get the address of the variable

Description

C++ Pointer address operator in front of a variable's name to get the address of the variable

#include <iostream>
using namespace std;
int main()/*from   ww w. j  av a  2  s . com*/
{
   int num;
   num = 22;
   cout << "The value stored in num is " << num << endl;
   cout << "The address of num = " << &num << endl;
   return 0;
}



PreviousNext

Related