PointerTest3

PointerTest3 - z = **x ; y = u + *w ; } } int main() { int...

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 = &amp; a; e = &amp; c ; cout &lt;&lt; &quot;a = &quot; &lt;&lt; a &lt;&lt; &quot;, b = &quot; &lt;&lt; b &lt;&lt; &quot;, c = &quot; &lt;&lt; c &lt;&lt; endl ; f (a, &amp;c, &amp;e, c, b) ; cout &lt;&lt; &quot;a = &quot; &lt;&lt; a &lt;&lt; &quot;, b = &quot; &lt;&lt; b &lt;&lt; &quot;, c = &quot; &lt;&lt; c &lt;&lt; endl ; }...
View Full Document

Ask a homework question - tutors are online