Home

Overview

Operators

Ex. Code

Errors

Importance

Links


Example Code --

Determine the output of the following example code in C++:

#include <iostream.h>

int main( )
{
    
double x;
    
double *xPointer;
     x = 10.25;
     xPointer = &x;
    
cout << "Actual value of pointer: " << xPointer << endl;
    
cout << "Value of item pointerd to: " << *xPointer << endl;
    
cout << "Value of &x: " << & x << endl;
    
return 0;
}

Sample output:


Group 1: S. Bhatnagar, S. Guruda, K. Kaul, A. Jain