Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

class Foo {
public:
Foo(int i) { }
};
class Bar : virtual Foo {
public:
Bar() { }
};

Bar b;

Referring to the above code, when the object 'b' is defined,
a compiler error will occur. What action fixes the compiler
error?
a) Adding a virtual destructor to the class Bar
b) Adding a constructor to Bar which takes an int parameter
c) Adding "Foo()" to the Bar constructor
d) Adding a copy constructor to the class Foo
e) Adding "Foo(0)" to the Bar::Bar initializer list

Answer Posted / guest

Ans. E

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a function to find the nth item from the end of a linked list in a single pass.

1020


What is different in C++, compare with unix?

1153


What is the difference between a definition and a declaration?

1112


What is constant in c++ with example?

1204


What is the full name of logo?

1167


Declare a class vehicle and make it an abstract data type.

1023


What is rvalue?

1189


Tell me what are static member functions?

1133


What is the use of vtable?

1192


Can I have a reference as a data member of a class? If yes, then how do I initialise it?

1278


what is c++

2432


What is boyce codd normal form in c++?

1212


Why do we use constructor?

1113


Why do we use structure in c++?

1131


Why c++ is created?

1052