Tag: programming languages

Questions Related to programming languages

  1. A class which can not be inherited

  2. A class which can have only single object

  3. A class which can not have any objects

  4. A class which can not inherit other classes


Correct Option: C
  1. Using virtual functions

  2. Using method overloading

  3. Using operator overloading

  4. Using both method & operator overloading


Correct Option: A
  1. constructors can be virtual

  2. destructors can be virtual

  3. constructors can be overloaded

  4. virtual functions are fast in execution


Correct Option: B,C
  1. all(d,si,i) in stack

  2. d in stack;si in heap;i in stack

  3. d in stack;si in stack;i in heap

  4. d in heap;si in heap;i in stack


Correct Option: B
  1. constructors are executed only(once) when the first object is instantiated

  2. destructor is executed only at the end of main() execution

  3. constructors are executed on every object instantiation

  4. destructor is executed when all the objects of the class moves out of scope

  5. constructors can not take parameters


Correct Option: C
  1. that can not be inherited

  2. that can be inherited only once

  3. that can have only one object

  4. there is no such class


Correct Option: C
  1. malloc is used to allocate store for integer arrays only

  2. new is used to allocate store for objects only

  3. new is used to allocate any kind of memory

  4. malloc is used to allocate any kind of memory

  5. new initializes the store after allocation

  6. malloc intializes the store after allocation


Correct Option: C,D