subject
Computers and Technology, 11.02.2021 21:20 Ddom

The following c++ program asks the user to enter two numbers. What is the output of the program if the user enters 12 and 14? #include
using namespace std;

void func1(int&, int&);
void func2(int&, int&, int&);
void func3(int, int, int);

int main()
{

int x = 0, y = 0, z = 10;
cout << x << " " << y << " " << z << endl;

func1 (x, y);
cout << x << " " << y << " " << z << endl;

func2 (x, y, z);
cout << x << " " << y << " " << z << endl;

func3 (x, y, z);
cout << x << " " << y << " " << z << endl;

return 0;
}

void func1 (int &a, int &b)
{
cout << "Enter two numbers: ";
cin >> a >> b;
}

void func2 (int &a, int &b, int &c)
{
b++;
c--;
a = b + c;
}

void func3 (int a, int b, int c)
{
a = b - c;
}

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:10, AleciaCassidy
Consider a direct-mapped cache with 216 words in main memory. the cache has 16 blocks of 8 words each. it is a word-addressable computer (rather than a byte-addressable computer which we normally discuss). (a) how many blocks of main memory are there? (b) what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, cache block, and block offset fields (if they apply)? (c) to which cache block will the memory reference db6316 map?
Answers: 1
image
Computers and Technology, 23.06.2019 12:00, xojade
Which of these is an example of an integrated presentation? a. a table created in powerpoint b. an image pasted into powerpoint c. a caption created in powerpoint d. an excel chart pasted into powerpoint
Answers: 1
image
Computers and Technology, 24.06.2019 02:30, sha273
Which option completes the explanation for conflict of interest in an organization
Answers: 1
image
Computers and Technology, 25.06.2019 08:30, aj12381
Which of the following terms is described as “the art and design of using text”? a. typography b. elements of design c. typos d. graphic design
Answers: 1
You know the right answer?
The following c++ program asks the user to enter two numbers. What is the output of the program if t...

Questions in other subjects: