Learn C++: post #47 — TG.ME

What is the output?

#include<iostream>

using namespace std;
void swap(int m, int n) {
int x = m;

m = n;
n = x;
}
main() {
int x = 5, y = 3;

swap(x,y);
cout<<x<<" "<<y;

}

@SuDevelopers | SUBSCRIBE
👍11❤5
July 14, 2023 18.2K 19