What will the variable "y" be in class B?
What will the variable "y" be in class B? class A { int x; protected: int y; public: int age; }; class B: private A { string name; public: void Print() { cout
What will the variable "y" be in class B? class A { int x; protected: int y; public: int age; }; class B: private A { string name; public: void Print() { cout
What happens when you attempt to compile and run the following code? #include using namespace std; int main() { float x=3.5,y=1.6; int i,j=2; i = x + j + y; cout
What happens when you attempt to compile and run the following code? #include using namespace std; void fun(int); int main() { int a=0; fun(a); return 0; } void fun(int n) { if(n < 2) { fun(++n); cout
What happens when you attempt to compile and run the following code? #include using namespace std; int s(int n); int main() { int a; a = 3; cout
What will be the output of the program? #include using namespace std; int fun(int); int main() { cout
What will the variable “age” be in class B? class A { int x; protected: int y; public: int age; A () { age=5; }; }; class B : public A { string name; public: B () { name=”Bob”; };…
What happens when you attempt to compile and run the following code? #include #include using namespace std; class complex{ double re, im; public: complex() : re(1),im(0.4) {} complex operator(complex &t); void Print() { cout
What happens when you attempt to compile and run the following code? #include using namespace std; class complex{ double re; double im; public: complex() : re(0),im(0) {} complex(double x) { re=x,im=x;}; complex(double x,double y) { re=x,im=y;} void print() { cout