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; }
Definition of class?
Name some pure object oriented languages?
Evaluate: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); a) 10 b) 11 c) 1
What is a modifier in c++?
What is a float in c++?
When we use Abstract Class and when we use Interface?where we will implement in real time?
Is c or c++ more useful?
What are compilers in c++?
What is the best c c++ compiler for windows?
How to defines the function in c++?
what is difference between static and non-static variables
Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?