Top 1000+ Object Oriented Programming (OOP) Subject Mcqs Pdf Download Set No 15

Print/Downlaod pdf

701.Suppose a program contains an array declared as int array [100]; what will be the size of array?

  1. 0
  2. 99
  3. 100 
  4. 101

702.The name of an array represents address of first location of array element?

  1. True
  2. False

703.Reusing the variables in program helps to save the memory?

  1. True
  2. False

704.Which of the following option is true about new operator to dynamically allocate memory to an object?

  1. The new operator determines the size of an object
  2. Allocates memory to object and returns pointer of valid type
  3. Creates an object and calls the constructor to initialize the object
  4. All of the given options

705.New and delete are whereas M allocation and free are?         

  1. Functions, operators
  2. Classes, operators
  3. Operators, functions 
  4. Operators, classes

706.Like member functions can also access the private data members of a class.

  1. Non-member functions
  2. Friend functions    
  3. Any function outside class
  4. None of the given options

707.Which of the following statement is best regarding declaration of friend function

  1. Friend function must be declared after public keyword.
  2. Friend function must be declared after private keyword.
  3. Friend function must be declared at the top within class definition.
  4. It can be declared anywhere in class as these are not affected by the public and private keywords.

 708.The operator function overloaded for an Assignment operator = must be?

  1. Non-member function of class
  2. Member function of class          
  3. Friend function of class
  4. None of the given options

709.For non-member operator function, object on left side of the operator may be?

  1. Object of operator class
  2. Object of different class
  3. Built-in data type
  4. All of the given options     

710.The operator function will be implemented as     if Object X drive the – operator whereas obj2 is passed as arguments to – operator in the statement given below. Object Z =   Object X –   Object Y?

  1. Member function 
  2. Non-member function
  3. Friend function
  4. None of the given options

711………….. is the declaration/exploration of overloaded pre-increment operator in OOP which are implemented as member function?

  1. Class-name operator + (;
  2. Class-name operator + (int;
  3. Class-name operator ++ (;    
  4. Class-name operator ++ (int

712.The static data members of a class are initialized?

  1. at file scope     
  2. within class definition
  3. within member function
  4. within main function

713.Class is a user defined?                    

  1. data type     
  2. memory referee
  3. value
  4. none of the given options.

714.We can also define a user-defines manipulators?

  1. True
  2. False

715.Automatic variable are created on?             

  1. Heap
  2. Free store
  3. static storage
  4. stack  

716.If Num is an integer variable then Num++ means?

  1. Add 1 two times with Num
  2. Add 1 with Num
  3. Add 2 with Num
  4. Subtract 2 from Num

717.If the return type of a function is void then it means that it will?

  1. Return any type of data
  2. Return some specific type of data
  3. Return no data
  4. Return just character data

718.Which of the following is a valid class declaration?

  1. class A {int x;};
  2. class B {}
  3. public class A {}
  4. object A {int x;};
  5. all

719.When we use manipulators in our program then which header file should be included?

  1. iostream’s
  2. stdlib.h
  3. stdio.h
  4. iomanip.h   

720.We can also create an array of user define data type?

  1. True 
  2. False

721.The normal source of Counter Input object is?

  1. File
  2. Disk
  3. Keyboard  
  4. RAM.

722.A stream is an ordered sequence of bytes?

  1. True  
  2. False

723.What is the sequence of event 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

724.We can delete an array of objects without specifying [] brackets if a class is not doing dynamic memory allocation internally?

  1. True
  2. False

  1. True
  2. False

725.The second parameter of operator functions for << and >> are objects of the class for which we are overloading these operators?

  1. True   
  2. False

726.Which looping process checks the test condition at the end of the look?

  1. for
  2. while
  3. do while
  4. no looping process checks the test condition at the end

727.In a group of nested loops, which loop is executed th most number of times?

  1. the outermost loop
  2. the innermost loop
  3. all loops are executed the same number of times
  4. cannot be determined without knowing the size of the loops

728.Template class cannot have static variables?

  1. True
  2. False

729.Consider the following statements to initialize a two-dimensional array.

  1. int arr[2][3] = {4, 8, 9, 2, 1, 6} ;
  2. D.int arr[3][2] = {4, 8, 9, 2, 1, 6} ;
  3. E.int arr[][2] = {{4,8},{9, 2},{1, 6}} ;

730.Which of the following option (s are correct to initialize a two-dimensional array with 3 rows and 2 columns?

  1. (ii only
  2. (iii only
  3. (ii and (iii
  4. and (iii

731. A pointer variable named pointer of type int then address of which type of variable the pointer will store in it?

  1. variable of type char    variable of type short  
  2. variable of type int
  3. variable of type double

732.Let suppose

Union intorDouble Int ival;

Double charvar;

};

Main {

intorDouble VAZ;

int size;

size = sizeof(VAZ;

}

  1. Yes
  2. No

733.Calculate the value/worth of variable “size”, if int occupies 4/Four bytes and double occupies 8/Eight bytes?

  1. 2
  2. 4
  3. 8
  4. 12

734.new and delete are Memory Allocation and free are?      

  1. Functions, operators
  2. Classes, operators
  3. Operators, functions 
  4. Operators, classes

735.The member functions of a class occupy region in memory for objects of class?

  1. separate,
  2. common, all     
  3. different, each
  4. different, all

736.Friend functions are of a class?

  1. Member functions
  2. Public member functions
  3. Private member functions
  4. Non-member functions   

737.Which of the following is true while overloading operators?

  1. Precedence of an operator can be changed
  2. The arity (number of operands can be change
  3. No new operators can be created
  4. Associatively of an operator can be changed

738.Which of the following option will be true to overload the -= operator?

  1. only – operator needs to be overloaded 
  2. Minus (- and = operators need to be overloaded
  3. the -= operator need to be overloaded explicitly
  4. the – and = operators need to be overloaded implicitly

739.The input/output streams; cin and cout are               

  1. Operators  
  2. Functions
  3. Objects
  4. Structures

740.dec, hex, oct are all               

  1. Member functions
  2. Objects of input/output streams
  3. Parameterized manipulators
  4. Non-parameterized manipulators 

741. What will be the output of the following statement? cout << setbase(16 << 52 ;)?

  1. 74
  2. 52
  3. 34
  4. 6

742.The first parameter of overloaded stream insertion operator is  where second parameter is?          

  1. input stream, object of class
  2. object of class, output stream
  3. output stream, object of class
  4. object of class, input stream

743.We can also do conditional compilation with preprocessor directives?

  1. True 
  2. False

744.With user-defined data type variables (Objects, self assignment can produce);                  .

  1. Syntax error
  2.  Logical error
  3. Link error
  4. None of the given options

745.The return type of the operator function for >> operator is?              .

  1. class for which we overload this operator
  2. reference of ostream
  3. class (ostream&    reference of istream
  4. H. class (istream&    void

746.When an object of a class is defined inside another class ?

  1. Constructor of enclosing class will be called first   
  2. Constructor of inner object will be called first
  3. K.Constructor and Destructor will be called simultaneously
  4. L.None of the given options

747.Where we can include a header file in the program?

  1. any where  
  2. in start
  3. at the end
  4. none of the given options.

748. A template function must have at least generic data type?

  1. six
  2. One
  3. Two
  4. Three

749.Which of the following statement is best regarding declaration of friend function?

  1. Friend function must be declared after public keyword
  2. Friend function must be declared after private keyword.
  3. Friend function must be declared at the top within class definition.
  4. It can be declared anywhere in class as these are not affected by the public and private keywords

750.Which one of the following is the declaration of overloaded pre-increment operator implemented as member function?

  1. Class-name operator + (;
  2. Class-name operator + (int;
  3. Class-name operator ++ (;      
  4. Class-name operator ++int;