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

What is the difference between set and map in c++?

0 Answers  


Explain how the virtual base class is different from the conventional base classes of the opps.

0 Answers  


Explain about vectors in c ++?

0 Answers  


What do you know about near, far and huge pointer?

0 Answers  


What does new do in c++?

0 Answers  






What is flag in computer?

0 Answers  


Which uses less memory? a) struct astruct { int x; float y; int v; }; b) union aunion { int x; float v; }; c) char array[10];

4 Answers   Quark,


What is auto type c++?

0 Answers  


What are static type checking?

0 Answers  


What is the Standard Template Library?

1 Answers  


If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3

0 Answers  


Can you sort a set c++?

0 Answers  


Categories