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

What is data types c++?

981


Give an example of run-time polymorphism/virtual functions.

974


Explain differences between alloc() and free()?

1077


Should I learn c or c++ or c#?

962


Explain what is oop?

1041


Differentiate between an inspector and a mutator ?

1169


Using a smart pointer can we iterate through a container?

1043


When does a name clash occur in c++?

1125


What are the advantages of using typedef in a program?

1116


What is a c++ class?

1058


What does return 0 do in c++?

1000


Is it legal in c++ to overload operator++ so that it decrements a value in your class?

1026


How to tokenize a string in c++?

1017


Why use of template is better than a base class?

1130


Write a program to find the Factorial of a number

1028