Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Address of operator in C++

#include <iostream>
 using namespace std;
 int main()
 {
     unsigned short varshort=1;
     unsigned long  varlongunsigned= 2;
     long varlongsigned = -3;
     char c='a';
     void *p=&c;
     double d=10;
     cout<<"value for character:\t\t"<<c;
     cout<<"\tAddress of charater:\t\t"<<p;
     cout<<"\nvalue for double:\t\t"<<c;
     cout<<"\tAddress of double:\t\t"<<&d;
     cout << "\nvalue for unsigned short:\t" << varshort;
     cout << "\tAddress of unsigned short:\t" << &varshort << "\n";
     cout << "value for unsigned long:\t"  << varlongunsigned;
     cout << "\tAddress of unsigned long:\t"  << &varlongunsigned  << "\n";
     cout << "value for signed long:\t\t"   << varlongsigned;
     cout << "\tAddress of signed long:\t\t"     << &varlongsigned  << "\n";
     
 
     return 0;
 }