What happens when you attempt to compile and run the following code?

Correct Answer for the Question – What happens when you attempt to compile and run the following code? is given below What happens when you attempt to compile and run the following code?#include #include using namespace std;int main(){ string s1[]= {“H” , “t” }; string s;for (int i=0; i

What is not inherited from the base class?

Correct Answer for the Question – What is not inherited from the base class? is given below What is not inherited from the base class? constructor destructor operator=() operator+() Correct Answer The Correct Answer for this Question is constructor destructor operator=() Explanation The Question – What is not inherited from the base class? has been answered … Read more

What will happen when you attempt to compile and run the following code?

Correct Answer for the Question – What will happen when you attempt to compile and run the following code? is given below What will happen when you attempt to compile and run the following code?#include using namespace std;int main(){const char *s; char str[] = “Hello “; s = str; while(*s) { cout

Which of the following statements are correct about an array?

Correct Answer for the Question – Which of the following statements are correct about an array? is given below Which of the following statements are correct about an array?int tab[10]; The array can store 10 elements. The expression tab[1] designates the very first element in the array. The expression tab[9] designates the last element in the … Read more

What happens when you attempt to compile and run the following code?

Correct Answer for the Question – What happens when you attempt to compile and run the following code? is given below What happens when you attempt to compile and run the following code?#include using namespace std; class complex{ double re; double im; public:complex() : re(0),im(0) {} complex(double x) { re=x,im=x;}; complex(double x,double y) { re=x,im=y;}void print() … Read more

What is the output of the program if characters ‘h’, ‘e’, ‘l’, ‘l’ , ‘o’ and enter are supplied as input?

Correct Answer for the Question – What is the output of the program if characters ‘h’, ‘e’, ‘l’, ‘l’ , ‘o’ and enter are supplied as input? is given below What is the output of the program if characters ‘h’, ‘e’, ‘l’, ‘l’ , ‘o’ and enter are supplied as input?#include #include using namespace std;void f();int … Read more