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\"; }
};

Answer Posted / shikha kataria

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

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the main purpose of c++?

814


Write a code/algo to find the frequency of each element in an array?

860


Differentiate between the message and method in c++?

843


Difference between class and structure.

914


Which is best c++ or java?

878


What is prototype in c++ with example?

767


What is a lambda function c++?

813


Can we specify variable field width in a scanf() format string? If possible how?

919


What do c++ programmers do?

812


What is c++ in english?

843


What is the function of I/O library in C++ ?

896


Explain the advantages of using friend classes.

865


Can c++ be faster than c?

818


Can we delete this pointer in c++?

977


What is the fastest c++ compiler?

806