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;
}
What will happen when you attempt to compile and run the following code?
#include
#include
using namespace std;
int fun(int);
int main()
{
int *x = new int;
*x=10;
cout << fun(*x);
return 0;
}
int fun(int i)
{
return i*i;
}
Dominga
7 days agoKarina
14 days agoLuisa
21 days agoQueenie
29 days agoPaul
1 month agoEliz
1 month agoRoyal
2 months agoShawnda
2 months agoTonja
2 months agoLucy
3 months agoMaybelle
3 months agoIsadora
3 months agoPrincess
3 months agoWeldon
4 months agoPaola
4 months agoBok
4 months agoBecky
4 months agoStephania
5 months agoCatarina
5 months agoHaley
5 months agoDell
5 months agoWhitley
6 months agoStephaine
6 months agoLazaro
8 months agoCeola
9 months agoAlecia
10 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
1 year agoDona
1 year 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