What is the output of the following code?

```
#include
using namespace std;

void f(double &p)
{
p += 2;
}

int main()
{
double x = 1;
double y = 1;

f(x);
f(y);

cout << "x is " << x;
cout << " y is " << y << endl;

return 0;
}
```

A. x is 2 y is 2
B. x is 1 y is 1
C. x is 1 y is 2
D. x is 3 y is 3
E. x is 2 y is 1


D. x is 3 y is 3

Computer Science & Information Technology

You might also like to view...

Which of the following settings can be altered to change the darkness of the font?

a) font-weight b) font-color c) font-family d) font-size

Computer Science & Information Technology

Each tweet must be 140 characters or less in length

Indicate whether the statement is true or false

Computer Science & Information Technology

In C++, the = symbol is called the ____________________ operator.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

What does the setfacl -b command do??

A. ?It removes all extra ACL assignments on a given file B. ?It sets 7777 on a given file or folder for all users / groups C. ?The file's user / group ownership is changed to to root / root D. ?The file's ACL assignments are created and are then ready to be modified.

Computer Science & Information Technology