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...
Which of the following determines the operator that is processed prior to another operator?
a) Operator associativity b) Operator precedence c) Whether the operator is an arithmetic operator d) None of these determine the order in which operators are processed.
A microchip is made:
a. of silicon b. from the same material as a postage stamp c. by the Altair company d. All of the above are true
The __________ SQL operator can be used to perform a search for a substring.
a.STR b.LIKE c.WHERE d.SUB
The terms algorithm and cipher describe the formula or process used to perform encryption.
a. true b. false