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; }
Explain deep copy?
What is the basic of c++?
Define a program that reads two matrices of size 3x3 with real values from the user then prints their sum, difference and multiplication.
Write a function that swaps the values of two integers, using int* as the argument type?
Can union be self referenced?
What is the most powerful coding language?
Can we use clrscr in c++?
We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?
Distinguish between new and malloc and delete and free().
Describe run-time type identification?
What is function overloading in C++?
What is the benefit of encapsulation?