What happens when you attempt to compile and run the following code?
#include
using namespace std;
int main(){
int i = 1;
if (i++==1) {
cout << i;
} else {
cout << i-1;
}
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 {
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();
}
Ceola
2 days agoAlecia
1 months agoThomasena
3 months agoHannah
4 months agoRonny
5 months agoEttie
5 months agoBrittni
6 months agoTijuana
6 months agoStephania
6 months agoIlene
6 months agoNoel
7 months agoShawna
7 months agoDonte
8 months agoMiss
8 months agoAretha
8 months agoRikki
8 months agoNickolas
9 months agoBobbye
9 months agoLeota
9 months agoDona
9 months agoStefania
9 months agoWalton
11 months agoGlory
11 months agoShawna
12 months agoTequila
12 months agoCordelia
12 months agoChuck
12 months agoBeckie
1 years ago