Essay on The Republic Day | Republic Day Essay in English
[ Festival Ganesh Chaturthi Essay in English for Students and Children ] [ Essay on my favourite freedom fighter ] ⚔️ [ दुर्गा पूजा पर निबंध (Durga Puja Hindi Essay) ]
[Essay On 75th Independence Day Of India] [Azadi Ka Amrit Mahotsav Essay in English]

What will be the output of the following program?

Loading

Practice Function Overloading –

What will be the output of the following program?

#include 
class Crackexams {
int x, y;
public:
void show(void);
void main(void);
};
void Crackexams::show(void) {
Crackexams b;
b.x = 2;
b.y = 4;
cout<< x << " " << y;
}
void Crackexams::main(void) {
Crackexams b;
b.x = 6;
b.y = 8;
b.show();
}
int main(int argc, char *argv[]) {
Crackexams run;
run.main();
return 0;
}

What will be the output of the following program?

Loading

Practice Function Overloading –

What will be the output of the following program?

#include 
class Base {
int x, y;
public:
Base() {
x = y = 0;
}
Base(int xx) {
x = xx;
}
Base(int p, int q = 10) {
x = p + q;
y = q;
}
void Display(void) {
cout<< x << " " << y << endl;
}
objDefault(1, 1);
};
class Derived: public Base {
Base obj;
public:
Derived(int xx, int yy): Base(xx, xx + 1) { }
Derived(Base objB = objDefault) { }
};
int main() {
Derived objD(5, 3);
Derived *ptrD = new Derived(objD);
ptrD->Display();
delete ptrD;
return 0;
}

Which of the following statement is correct about the program given

Loading

Practice Function Overloading –

Which of the following statement is correct about the program given below?

#include  
static int Result;
class India {
public:
void Change(int x = 10, int y = 20, int z = 30) {
cout<< x + y + z;
}
void Display(int x = 40, float y = 50.00) {
Result = x % x;
cout<< Result;
}
};
class Try {
int x, y;
public:
void Change(int x, int y = 50) {
cout<< x + y;
}
};
class Crackexams: public India, public Try {
public:
void Display(int x = 10, int xx = 100, int xxx = 1000) {
Result = x + xx % x * x;
cout<< Result ;
}
};
int main() {
Crackexams objTry;
objTry.India::Display(10, 20.00);
return 0;
}

Which of the following statement is correct about the program given

Loading

Practice Function Overloading –

Which of the following statement is correct about the program given below?

#include  
class LGArray {
int array[3][3];
public:
LGArray(int arr[3][3] = NULL) {
if(arr != NULL) {
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 3; j++) {
array[i][j] = i+j;
}
}
}
}
void Display(void) {
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 3; j++) {
cout<< array[i][j] << " ";
}
}
}
};
int main() {
LGArray objBA;
objBA.Display();
return 0;
}