What happens when you attempt to compile and run the following code?
#include
#include
#include
using namespace std;
int main(void)
{
string s;
s = "Test";
s.resize (s.size() ? 1);
cout<
return 0;
}
What is the output of the program given below?
#include
using namespace std;
int main (int argc, const char * argv[])
{
int i=10;
{
int i=0;
cout<
}
{
i=5;
cout << i;
}
cout<
return 0;
}
What is the output of the program?
#include
#include
using namespace std;
union t
{
char c;
int i;
};
class First
{
union t u;
public:
First() {
u.c = 'A';
}
void Print(){
cout << u.c;
}
};
int main()
{
First *t = new First();
t?>Print();
}
What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class Second;
class Base {
int age;
public:
Base () { age=5; };
friend void set(Base &ob, Second &so);
void Print() { cout << age;}
};
class Second {
string name;
public:
friend void set(Base &ob, Second &so);
void Print() { cout << name;}
};
void set(Base &ob, Second &so) {
ob.age = 0; so.name = "Bill";
}
int main () {
Base a;
Second b;
set(a,b);
a.Print();
b.Print();
return 0;
}
What happens when you attempt to compile and run the following code?
#include
using namespace std;
int main() {
float i = 1.0 / 2 * 2 / 1 * 2 / 4 * 4 / 2;
cout << i;
return 0;
}
Daniel
6 days agoDominga
18 days agoKarina
25 days agoLuisa
1 month agoQueenie
1 month agoPaul
2 months agoEliz
2 months agoRoyal
2 months agoShawnda
2 months agoTonja
3 months agoLucy
3 months agoMaybelle
3 months agoIsadora
3 months agoPrincess
4 months agoWeldon
4 months agoPaola
4 months agoBok
4 months agoBecky
5 months agoStephania
5 months agoCatarina
5 months agoHaley
5 months agoDell
6 months agoWhitley
6 months agoStephaine
6 months agoLazaro
8 months agoCeola
9 months agoAlecia
11 months agoThomasena
12 months agoHannah
1 year agoRonny
1 year agoEttie
1 year agoBrittni
1 year agoTijuana
1 year agoStephania
1 year agoIlene
1 year agoNoel
1 year agoShawna
1 year agoDonte
1 year agoMiss
1 year agoAretha
1 year agoRikki
1 year agoNickolas
1 year agoBobbye
1 year agoLeota
2 years agoDona
2 years agoStefania
2 years agoWalton
2 years agoGlory
2 years agoShawna
2 years agoTequila
2 years agoCordelia
2 years agoChuck
2 years agoBeckie
2 years ago