Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void testParaPassing (int &a, int *b, int c) {
- a = *b + c;
- *b = a + c;
- c = a + *b;
- }
- int main () {
- int x = 5, y = 5, z = 5;
- testParaPassing (x, &y, z);
- cout << "x = " << x << ", y = " << y << ", z = " << z << endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment