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...


template<class T, class X> class Obj {
T my_t;
X my_x;
public:
Obj(T t, X x) : my_t(t), my_x(x) { }
};
Referring to the sample code above, which one of the
following is a valid conversion operator for the type T?
a) T operator T () { return my_t; }
b) T operator(T) const { return my_t; }
c) operator(T) { return my_t; }
d) T operator T (const Obj &obj) { return obj.my_t; }
e) operator T () const { return my_t; }



template<class T, class X> class Obj { T my_t; X my_x; public: Obj(T t, X ..

Answer / guest

option 'e' is the correct one

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

reading material is provided 3 books for c++ if u need more do let me know thnx i hve lots of material do let me know if u want it

2 Answers  


Why do we use classes in programming?

0 Answers  


sir i want to study the c++ course but ino what is the qualification and the study methode please reply more details in c++

1 Answers   NIIT,


Can a function take variable length arguments, if yes, how?

0 Answers  


what does the following statement mean? int (*a)[4]

0 Answers  


You run a shell on unix system. How would you tell which shell are you running?

0 Answers  


What are the benefits of operator overloading?

0 Answers  


What is c++ and its uses?

0 Answers  


How to create a reference variable in C++

1 Answers  


What is the difference between prefix and postfix versions of operator++()?

0 Answers  


What is an object in c++?

1 Answers  


Is it possible for a member function to delete the pointer, named this?

0 Answers  


Categories