Gwen the function and the main function calling it Which If
Gwen the function, and the main function calling it: Which, If any, of the following choices is the output of the #include using namespace std; void tunc (int& x, int & y) {int t = x; x = y; y = t;} int main() {int u = 3; = 4//... cout
Solution
Answer is option b
Solution.cpp
#include <iostream>//header for input out function
using namespace std;//it tells the compiler to link std namespace
void func(int &x,int &y)
{//function defintion
int t=x;
x=y;
y=t;
}
int main()
{//main function
int u=3,v=4;
cout<<u<<\"\"<<v<<endl;
func(u,v);
cout<<u<<\"\"<<v<<endl;
return 0;
}
output
34
43
