Write a corrected statement in c++ so that the statement
will work properly. if (4 < x < 11) y=2*x;
Why is c++ a mid-level programming language?
What do you mean by inheritance in c++?
what is the emaning of '#include" "'?
What operator is used to access a struct through a pointer a) >> b) -> c) *
What is the most useful programming language?
What sorting algorithm does c++ use?
class A { public: void f(); protected: A() {} A(const A&){} }; Examine the class declaration shown above. Why are the default and copy constructors declared as protected? 1. To ensure that A cannot be created via new by a more derived class 2. To ensure that A cannot be copied 3. To ensure that A cannot be used as a base class except when public inheritance has been used 4. To ensure that A cannot be created/copied outside the inheritance chain 5. To ensure that A cannot be instantiated as a static variable
Differentiate between an inspector and a mutator ?
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; }
What are the different types of polymorphism in c++?
How the delete operator differs from the delete[]operator?
describe private access specifiers?