Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
182 B
0
Indexable
Never
#include <iostream>
using namespace std;

void foo(int &a, int &b) {
	int c = a;
	a = b;
	b = c;
	cout << a << ' ' << c;
}

int main() {
	int a = 0, b = 1;
	foo(a, b);
}
Leave a Comment