(A) True
(B) False
(C) Both
(D) None
Tag: Introduction to Programming Mcqs
What is the sequence of event(s) when allocating memory using new operator?
(A) What is the sequence of event(s) when allocating memory using new operator?
(B) Only constructor is called for objects
(C) Memory is allocated first before calling constructor
(D) Constructor is called first before allocating memory
When we define an array of objects then,?
(A) Destructor will call once for whole array
(B) Destructor will call for each object of the array
(C) Destructor will never call
(D) Depends on the size of array
When an array is passed to a function then default way of passing this array is,?
(A) By data
(B) By reference
(C) By value
(D) By data type
In C/C++ if we define an array of size eight (8) i.e. int Arr [8]; then the last element of this array will be stored at,?
(A) Arr[0]
(B) Arr[8]
(C) Arr[7]
(D) Arr[-1]
Array is a data structure which store?
(A) Memory addresses
(B) Variables
(C) Data Type
(D) Data
The first parameter of operator function for << operator __.
(A) Must be passed by value
(B) Must be passed by reference
(C) Can be passed by value or reference
(D) Must be object of class
The destructor is used to __.
(A) allocate memory
(B) allocate memory
(C) create objects
(D) allocate static memory