Guest User

Untitled

a guest
Jun 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void testParaPassing (int &a, int *b, int c) {
  5. a = *b + c;
  6. *b = a + c;
  7. c = a + *b;
  8. }
  9.  
  10. int main () {
  11. int x = 5, y = 5, z = 5;
  12.  
  13. testParaPassing (x, &y, z);
  14. cout << "x = " << x << ", y = " << y << ", z = " << z << endl;
  15.  
  16. return 0;
  17. }
Add Comment
Please, Sign In to add comment