#include <iostream> using namespace std; void modify(int &, int)); int main() {
ID: 3832664 • Letter: #
Question
#include <iostream>
using namespace std;
void modify(int &, int));
int main()
{
int x,y = 15;
int &z = x
x = 10
cout << “first: “ << x << “ “ << y << “ “ << z << endl;
modify(x,y);
cout << “second: “ << x << “ “ << y << “ “ << z << endl;
return 0;
}
void modify(int &j, int k)
{
j - -;
k++;
cout << “in modify; “ << j << “ “ << k << endl;
return;
}
Explanation / Answer
Answer: below is the output the above code will print
first: 10 15 10
in modify; 9 16
second: 9 15 9
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.