PointerTest3

PointerTest3 - z =*x y = u*w int main int a b c*d*e a = 1 b...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> using namespace std ; void g ( int a, int & b, int * c, int * * d) { int x ; x = a + *c ; b = x + 2 ; **d = x + b ; *d = c; **d = 9 ; } int u ; v = 4 ; **x = 2 ; u = z ; if (**x == z ) { * w = v ; } if (**x == y ) {
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: z = **x ; y = u + *w ; } } int main() { int a, b, c, *d, *e ; a = 1; b = 2; c = 3; d = & a; e = & c ; cout << "a = " << a << ", b = " << b << ", c = " << c << endl ; f (a, &c, &e, c, b) ; cout << "a = " << a << ", b = " << b << ", c = " << c << endl ; }...
View Full Document

This note was uploaded on 10/28/2010 for the course CSCI 1113 taught by Professor Staff during the Spring '08 term at Minnesota.

Ask a homework question - tutors are online