some test code

some test code - int main() { int x = 0; int y = 1; y = y +...

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

View Full Document Right Arrow Icon
#include <iostream> using namespace std; int grow1(int x, int y) { x = x + y; return x; } int grow2(int * x, int * y) { *x = *x + *y; return *x; } int grow3(int & x, int & y) { x = x + y; return x; }
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int main() { int x = 0; int y = 1; y = y + grow1(x,y); y = y + grow2(&amp;x,&amp;y); y = y + grow3(x,y); cout &lt;&lt; (y+x) &lt;&lt; endl; return 0; }...
View Full Document

Ask a homework question - tutors are online