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()
{
Foo foo;
foo.p();
return 0;
}
```
a. x is 20 y is 20
b. x is 10 y is 10
c. x is 10 y is 20
d. x is 20 y is 10
d. x is 20 y is 10
You might also like to view...
Objects are made up of data and operations on that data, so we say that an object __________ data and operations.
Fill in the blank(s) with correct word
The ____ format adheres to an international set of graphics standards, is probably the format used by the camera on your cell phone, and is supported by most digital cameras today.
A. PNG B. GIF C. JPEG or JPG D. TIFF