Put address operator in front of a variable's name to get the address of the variable. - C++ Operator

C++ examples for Operator:Address Operator

Description

Put address operator in front of a variable's name to get the address of the variable.

Demo Code

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

Result


Related Tutorials