Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following program what will the output be? Please explain, not just give me the answer. I know it is 11 31 #include using

Given the following program what will the output be? Please explain, not just give me the answer. I know it is 11 31

#include using

namespace std;

void one(int x, int& y);

void two(int& s, int t);

int main()

{

int u = 1;

int v = 2;

one(u, v);

cout << u << " " << v << endl;

two(u, v);

cout << u << " " << v << endl;

return 0;

}

void one(int x, int& y)

{

int a;

a = x; x = y;

y = a;

}

void two(int& s, int t)

{ int b;

b = s - t;

s = t + b + 2;

t = 4 * b;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions

Question

What is Ramayana, who is its creator, why was Ramayana written?

Answered: 1 week ago

Question

6. Effectively perform the managers role in career management.

Answered: 1 week ago