pKmcqsquiz

Computer

Pagination on API result
Question: Deleting an array of objects without specifying [] brackets may lead to memory leak?
  • 1. True
  • 2. False
  • 3. Both
  • 4. None
Question: What is the sequence of event(s) when allocating memory using new operator?
  • 1. Only block of memory is allocated for objects
  • 2. Only constructor is called for objects
  • 3. Memory is allocated first before calling constructor
  • 4. Constructor is called first before allocating memory
Question: What is the functionality of the following statement? String str[5] = ,String(“Programming”), String(“CS201”)-;?
  • 1. Default constructor will call for all objects of array
  • 2. Parameterized constructor will call for all objects of array
  • 3. Parameterized constructor will call for first 2 objects and default constructor for remaining objects
  • 4. Default constructor will call for first 3 objects and Parameterized constructor for remaining objects
Question: When x = 7; then the expression x%= 2; will calculate the value of x as,?
  • 1. 1
  • 2. 3
  • 3. 7
  • 4. 2
Question: A pointer variable can be,?
  • 1. Decremented only
  • 2. Incremented only
  • 3. Multiplied only
  • 4. Both 1 and 2
Question: set precision is a parameter less manipulator.
  • 1. True
  • 2. False
  • 3. Both
  • 4. None
Question: We can change a Unary operator to Binary operator through operator overloading.
  • 1. True
  • 2. False
  • 3. Both
  • 4. None
Question: delete operator is used to return memory to free store which is allocated by the new operator?
  • 1. True
  • 2. False
  • 3. Both
  • 4. None
Question: When we do dynamic memory allocation in the constructor of a class, then it is necessary to provide a destructor.
  • 1. True
  • 2. False
  • 3. Both
  • 4. None
Question: Overloaded member operator function is always called by?
  • 1. Class
  • 2. Object
  • 3. Compiler
  • 4. Primitive data type

Search

Category

Subjects