What is the output of this prog. ?


struct A { A(){ cout << \"A\"; } };
struct B { B(){ cout << \"B\"; } };
struct C { C(){ cout << \"C\"; } };
struct D { D(){ cout << \"D\"; } };
struct E : D { E(){ cout << \"E\"; } };
struct F : A, B
{
C c;
D d;
E e;
F() : B(), A(),d(),c(),e() { cout << \"F\"; }
};

Answers were Sorted based on User's Feedback



What is the output of this prog. ? struct A { A(){ cout << \"A\"; } }; struct..

Answer / shikha kataria

this program doesnot contain main() function.
so it cannot run

Is This Answer Correct ?    7 Yes 0 No

What is the output of this prog. ? struct A { A(){ cout << \"A\"; } }; struct..

Answer / amit prakash

der's no main function so it cant run...

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More C++ General Interview Questions

Write a C++ Program to check whether a number is prime number or not?

0 Answers   IBS,


What is the c++ code?

0 Answers  


Explain Text Manipulation Routines?

0 Answers  


Who was the creator of c++?

0 Answers  


Explain about vectors in c ++?

0 Answers  


Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?

0 Answers  


What are special characters c++?

0 Answers  


What is c++ w3school?

0 Answers  


What is diamond problem in c++?

0 Answers  


What is flush programming?

0 Answers  


What will i and j equal after the code below is executed? Explain your answer.

1 Answers  


What is #include iostream?

0 Answers  


Categories