What is the output of the following code?
```
#include
using namespace std;
class Foo
{
public:
int x; // data field
int y; // data field
Foo()
{
x = 10;
y = 10;
}
void p()
{
int x = 20; // local variable
cout << "x is " << x << " ";
cout << "y is " << y << endl;
}
};
int main()
#include
using namespace std;
class Foo
{
public:
int x; // data field
int y; // data field
Foo()
{
x = 10;
y = 10;
}
void p()
{
int x = 20; // local variable
cout << "x is " << x << " ";
cout << "y is " << y << endl;
}
};
int main()
{
Foo foo;
foo.p();
return 0;
}
```
a. x is 20 y is 10
b. x is 10 y is 20
c. x is 20 y is 20
d. x is 10 y is 10
a. x is 20 y is 10
You might also like to view...
What is the purpose of the Secure tab on a switch?
a. The switch port will use port discovery to assign a MAC address to the port. b. The switch port will automatically disable itself if a device with a different MAC address connects to the port. c. The switch port will use a different MAC address than the one connected to the port. d. This enables the switch to select what networking devices have a selectable IP address.
If you want a consistent light source, the Use Global Source feature is a great option.
Answer the following statement true (T) or false (F)
The ________ displays the time that has elapsed since the video started while the video is playing
A) title bar B) control panel C) status bar D) slide pane
A good password is any unusual word found in a dictionary
Indicate whether the statement is true or false