What is the exact output of the program below? #include using namespace std; int
ID: 3769011 • Letter: W
Question
What is the exact output of the program below?
#include using namespace std;
int n = 10;
void myfunc1(int k)
{
k /= (float) 3;
cout<< n<<"+"<< k <<‘ ’;
}
int myfunc2(int &x)
{
x = 100;
return 50;
void myfunc3(int &n, int k)
{
n = 3, k = (10>0);
cout<< n<<"+"<< k<<‘ ’;
}
int main()
{
int k = 10;
cout << n++ << endl;
cout << ++k << endl;
cout << n<<"+"<< k <<’ ’;
myfunc1(k);
cout<< n <<"+"<< k <<‘ ’;
k = myfunc2(n);
cout<< n <<"+"<< k <<‘ ’;
} // program continues à
myfunc3(k, n);
cout<< n++ <<"+"<< k <<‘ ’;
return 0; }
Explanation / Answer
Output of the program is :
10
11
11+11
11+3
11+11
100+50
3+1
100+3
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.