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

Answer Posted / guest

option 'e' is the correct one

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

the first character in the variable name must be an a) special symbol b) number c) alphabet

1081


What are files in c++?

1031


What is the difference between a template and a macro?

1044


When should we use container classes instead of arrays?

1009


What is auto used for in c++?

1044


What is the best c++ compiler for windows 10?

1026


What is the difference between passing by reference and passing a reference?

1067


Differentiate between an external iterator and an internal iterator?

985


What is the main function c++?

1098


What are the uses of static class data?

1170


Why do we use constructor?

1039


What is math h in c++?

1162


What are c++ templates used for?

1128


What is an adjust field format flag?

1105


What is array in c++ example?

1100