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

Print/Downlaod pdf

751.The user defined Class is?                     

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

752.How many bytes will the pointer int Pointer of type int move in the following statement?

Integer Pointer += 3 ; ?

  1. 3 bytes
  2. 6 bytes
  3. 12 bytes
  4. 24 bytes

753.Which of the following is the correct C++ syntax to allocate space dynamically for an array int?

  1. new int (10);
  2. new int [10];
  3. int new (10;
  4. int new [10];

754.A Pointer is a special variable that contain?

  1. Data value
  2. Memory Address
  3. Both data and values
  4. None of the given option

755.Reference Value Type Data The code is written to the program?

  1. implement
  2. design
  3. analysis
  4. none of the given options

756.Operator overloading can be performed through?                                  

  1. Classes
  2. Function371
  3. Operators
  4. Reference


757.When a value is referred by a normal variable then it is known a?

  1. Direct Reference
  2. Indirect Reference.
  3. Partial Reference
  4. Proper Reference

758.Which of the following function is used to increase the size of already allocated memory

Chunk?

  1. malloc
  2. calloc
  3. realloc
  4. free

759.Which of the following is NOT a preprocessor directive?

  1. #Error
  2. #Define
  3. #Line
  4. #n defines

760.Two stream objects Cin and Cout are included in which header file

  1. iostream.h
  2. fstream.h
  3. istream.h
  4. ostream.h

761.Overloaded delete operator function takes the same parameter as an argument returned by new operator function?

  1. True
  2. False

762.When an array of object is created dynamically then there is no way to provide parameterized constructors for array of objects?

  1. True  
  2. False

763.C is widely known as development language of   operating system?

  1. Linux
  2. Windows
  3. Unix
  4. Mac OS

764.Computer can understand only machine language code?

  1. True
  2. False   

765.We cannot define a function as a friend of a Template class?

  1. True
  2. False

766.What will be the value of ‘x’ and ‘y’ after executing the following statements?

X = 3;

y = x++;

  1. 3, 4
  2. 4, 4
  3. 3, 3
  4. 4, 3

767.Consider the following code segment. What will be the output of following code?

Int addValue (int *a?

int b = (*a + 2;

return b ;

}

main ( {

int x =6;

cout << x << “,”;

cout <<ddValue(&x << “,” ;

cout << x;

}

  1. 6,8,6
  2. 6,6,8
  3. 6,8,8
  4. 6,6,6

768…… is used to trace the logic of the program and correct the logical errors?

  1. Compiler
  2. Editor
  3. Linker
  4. Debugger

769.New and delete are   whereas mallocation?       

  1. Functions, operators
  2. Classes, operators
  3. Operators, functions
  4. Operators, classes
  5. new and delete operators

770.The member functions, can also access the private data members of a class?

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

771.Which situation would require the use of a non-member overloaded operator?

  1. The overloaded operator is an Assignment operator.
  2. The left most operand is an object of a class.
  3. The left operand is built-in data type.
  4. The operator returns a reference.

772.The stream insertion and stream extraction operators are already overloaded for?      

  1. User-defined data types
  2. Built-in data types
  3. User-defined and built-in data types
  4. None of the given options

773.Which of the following function do NOT initialize the chunk of memory to all zero?

  1. calloc(function
  2. Both malloc (and calloc(
  3. None of the above
  4. mallocation function.

774.The function free (returns back the allocated memory got thorough c allocation and

M allocation to?          

  1. stack
  2. heap
  3. stack and heap
  4. None of the given options

775.width is member function of?          

  1. cin object
  2. cout object
  3. Both CIN and COUT object
  4. None of the given option

776.Templates are not type safe?

  1. true
  2. false

778.A Matrix can be composed of ints, floats or doubles as their elements. Best way is to handle this Write a separate class to handle each?

  1. Use templates
  2. Use strings to store all types
  3. None of the given options

779.In if structure the block of statements is executed only?

  1. When the condition is false
  2. When it contains arithmetic operators
  3. When it contains logical operator
  4. When the condition is true

780.Header file: fstream.h includes the definition of the stream classes?                    

  1. ifstream, fstream, cout
  2. ifstream, fstream, ofstream
  3. fstream, cin, cout
  4. None of the above

781.To access the data members of structure   is used?

  1. dot operator
  2. operator
  3. operator
  4. None of given.

782. Bad (good(clear(  all are manipulators)?

  1. True
  2. False

783.Which kind of functions can access private member variables of a class?

  1.  Friend functions of the class
  2. Private member functions of the class
  3. Public member functions of the class
  4. Friend, private and public functions

784.The return type of operator function must always be void?

  1. True  
  2. False

785.Friend function of a class is?                            

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

786.Function implementation of friend function must be defined outside the class?

  1. True
  2. False

787.The normal source of cin object is?

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

788.Which of the following is correct way to initialize a variable x of int type with value 10?

  1. int x; x = 10;
  2. int x = 10;
  3. int x, x = 10;
  4. x = 10;

789.Consider the following code segment. What will be the output of the following program?

int func(int ;

int num = 10;

int main ({int num; num = 5;

cout << num;

cout << func(num ;

}

int func(int x{

return num ;

}

  1. I 5, 5
  2. 10, 5
  3. 5, 10
  4. 10, 10

790.With template function, the compiler automatically detects the passed data and generates a new copy of function using passed data.

  1. True 
  2. False

791.What will be the correct syntax to declare two-dimensional array of float data type?

  1. float arr{2}{2} ;
  2. float arr[2][2] ;          
  3. float arr[2,2] ;
  4. float [2][2] arr;

792.The first parameter of operator function for << operator?

  1. Must be passed by value
  2. Must be passed by reference446
  3. F.Can be passed by value or reference
  4. G.Must be object of class

793.Heap is constantly changing in size?

  1. True
  2. False

794.While calling function, the arguments are assigned to the parameters from?                       

  1. left to right
  2. .right to left
  3.  no specific order is followed
  4. none of the given options.

795.Classes defined inside other classes are called?

  1. classes
  2. looped
  3. nested
  4. overloaded
  5. none of the given options.

796.If we define an identifier with the statement

#defineP13.1415926 then during the execution of the program?

  1. the value of PI                    
  2.  cannot be replaced
  3. None of the given options
  4. Remain constant
  5. V.can be changed by some operation

797.Which value is returned by the destructor of a class?

  1. A pointer to the class.
  2. An object of the class.
  3. A status code determining whether the class was destructed correctly
  4. Destructors do not return a value

798 All class contains?                            

  1. Constructor
  2. Destructor
  3. Both a constructor and a destructor
  4. None of the given options

799.A template function?

  1. One or more than one argument
  2. Only one argument
  3. Zero arguments
  4. None of the given options

800.Structured Query Language is used for?

  1. Databases Management5
  2. Networks
  3. Writing Operating System
  4. none of the given options