What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class A {
int x;
protected:
int y;
public:
int z;
A() { x=1; y=2; z=3; }
};
class B : public A {
string z;
public:
void set() {
y = 4;
z = "John";
}
void Print() {
cout << y << z;
}
};
int main () {
B b;
b.set();
b.Print();
return 0;
}
What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class A {
int x;
protected:
int y;
public:
int z;
A() { x=1; y=2; z=3; }
};
class B : public A {
public:
void set() {
y = 4; z = 2;
}
void Print() {
cout << y << z;
}
};
int main () {
B b;
b.set();
b.Print();
return 0;
}
What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class A {
int x;
protected:
int y;
public:
int z;
};
class B : public A {
string name;
public:
void set() {
y = 2;
z = 3;
}
void Print() { cout << y << z; }
};
int main () {
B b;
b.set();
b.Print();
return 0;
}
What happens when you attempt to compile and run the following code?
#include
using namespace std;
class First
{
public:
First() { cout << "Constructor";}
void Print(){ cout<<"from First";}
};
int main()
{
First FirstObject;
FirstObject.Print();
}
What is the output of the program given below?
#include
using namespace std;
int main (int argc, const char * argv[])
{
float f=?10.501;
cout<<(int)f;
}
Thomasena
1 months agoHannah
2 months agoRonny
3 months agoEttie
3 months agoBrittni
4 months agoTijuana
4 months agoStephania
5 months agoIlene
5 months agoNoel
5 months agoShawna
6 months agoDonte
6 months agoMiss
6 months agoAretha
7 months agoRikki
7 months agoNickolas
7 months agoBobbye
7 months agoLeota
8 months agoDona
8 months agoStefania
8 months agoWalton
9 months agoGlory
10 months agoShawna
10 months agoTequila
10 months agoCordelia
10 months agoChuck
10 months agoBeckie
11 months ago