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

Print/Downlaod pdf

951.When new operator is overloaded at global level then corresponding built-in new operator will not be visible to whole of the program?

  1. True
  2. False   

952.If there is more than one statement in the block of a for loop, which of the following must be placed at the beginning and the ending of the loop block?

  1. parentheses
  2. braces {}37
  3. brackets []
  4. arrows < >

953.The return type of a function that do not return any value will be?                

  1.  float
  2. in void
  3. double   

954.UNIX has been developed in   language?

  1. JAVA
  2. B
  3. C
  4. FORTRAN  

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

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

956.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   

957.The operator function overloaded for an Assignment operator = will be?

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

958.The endl and flush are?       

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

959.If a symbolic constant has been defined, it will be an error to define it again?

  1. True
  2. False    

960.The operator used for casting, in C, is standard?

 operator.

  1. none of the given options.
  2. cast
  3. cost
  4. const 

961.Constructors cannot be overloaded like ordinary functions?

  1. True
  2. False

 962.which of the following function call is correct for the function prototype?

Default Parameters int a, int b = 7, char z = ‘*’;

  1. default Parameters (5;
  2. default Parameters (5, ‘8’;
  3. default Parameters (6, ‘#’;
  4. default Parameters (0, 0, ‘*’, 0;

963.When an operator function is defined as member function for a binary Plus then the number of arguments it takes is?

  1. Zero

B. One

C Two

D. N arguments


964.We cannot define a variable of user-defined data type in the class?

  1. True
  2. False  

965.When an object of a class is defined inside the class?

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

966.The appropriate data type to store the number of rows and column of the matrix is?                       

  1. float
  2. int
  3. char
  4.  none of the given options.   

967.Class of a user defined is?                    

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

968.A pointer variable can be?

  1. Decremented
  2. Incremented
  3. Multiplied
  4. Both Incremented and Decremented

969.NULL value has been defined in?

header files.

  1. strings.h and iostream’s
  2. ctype.h and conic
  3. conio.c and conio.
  4. stdlib.h and stddef.h

970.A Matrix can be composed of 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

971.Which of the following option will be true, if we overload “-=” operator?

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

972.In C/C++ if we define an array of size eight then the last element of this array will be stored?

  1. Arr[F.  
  2. Arr[8]
  3. Arr[7]
  4. Arr[-1]

973.When an array is passed to a function then default way of passing this array will?

  1. By data
  2. By reference
  3. By value
  4. By data type

974.Array is a data structure which store?

  1. Memory addresses
  2. Variables
  3. Data Type
  4. Data

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

  1. True
  2. False

976.When we define an array of objects then?

  1. Destructor will call once for whole array
  2. Destructor will call for each object of the array
  3. Destructor will never call
  4. Depends on the size of array

977.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

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

  1. True
  2. False

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

  1. True
  2. False

980.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;

981.Default mechanism of function calling in case of array is and in case of variable is?     

  1. Call by value, call by reference
  2. Call by reference, call by reference
  3. Call by reference, call by value
  4. Call by value, call by value

982. STL stands for?

  1. Source template library
  2. Standard template library
  3. Stream template library
  4. Standard temporary library

983.Skill are needed by programmer’s                                             

  1. Paying attention to detail
  2. Think about the reusability
  3. Think about user interface
  4. All of the given options4 & 5

984.For which array, the size of the array should be one more than the number of elements in an array?

  1. Int double
  2. float
  3. char

985.new and delete are whereas allocation of memory?  

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

986.Friend functions are of a class.

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

987.The prototype of friend functions must be written   the class and its

  1. definition must be written?     
  2. inside, inside the class
  3. inside, outside the class
  4. outside, inside the class
  5. outside, outside the class

988.If overloaded plus operator is implemented as non-member function then which of the following statement will be true for the statement given obj3 = obj1 + obj2;

  1. obj2 will be passed as an argument to + operator whereas obj2 will
  2. drive the + operator
  3. obj1 will drive the + operator whereas obj2 will be passed as an argument to + operator
  4. Both objects (obj1, obj2 will be passed as arguments to the + operator (not sure
  5. Any of the objects (obj1, obj2 can drive the + operator

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

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

990.For cin, the source is normally a  and destination can be?         .

  1. File, native data type
  2. Disk, user-define type
  3. Keyboard, variable
  4. For cin, the source is normally keyboard and the destination can be an ordinary variable
  5. File, user-define type

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

  1. True
  2. False

992.The programs, in which we allocate static memory, run essentially on?           

  1. Heap
  2. System Cache
  3. None of the given options
  4. Stack280

993.The programs, in which we allocate static memory run essentially on stack

  1. The default value of a parameter can be provided inside the 
  2. function prototype
  3. function definition
  4. both function prototype or function definition
  5. none of the given options.

994.The default value of a parameter is provided inside the function prototype or function definition.

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.

995.When an operator function is defined as member function for a binary Plus (+ operator then the number of argument it take?

  1. 0         
  2. One
  3. Two371
  4. N arguments

996.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

997.Assignment operator is used to initialize a newly declared object from existing

Object?

  1. True
  2. False

998.In the member initialize list, the data members are initialized?

  1. From left to right
  2. From right to left
  3. In the order in which they are defined within class
  4. None of the given options


999.new operator allocates memory from free store and return?                          

  1. A pointer
  2.  A reference
  3. An integer
  4. A float

1000.”new” and “delete” keywords are in C++ language?

  1. Built-in- Function
  2. Operators
  3. Memory Allocation Function   
  4. None of the given options