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

Print/Downlaod pdf

851.  In which 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 option

852.Which 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

853.The operator function overloaded for an Assignment operator

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

854.The ENDL and flush are        

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

855.If a symbolic constant has been defined, How this error to will be redefine


  1. True
  2. False

856.The operator used for casting, in C?

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

857.Constructors cannot be overloaded for ordinary functions.

  1. True
  2. False

858.Which of the following function call will be for the function prototype?

Default Parameter Sint 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;

859.When an operator function is defined as member function for a binary Plus operator?

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

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

  1. True
  2. False

861.When the 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. Constructor and Destructor will be called simultaneously
  4. None of the given options

862.The appropriate data type for store the number of rows and columns of the matrix

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

863.Class is a user defined                     

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

864. The pointer variable can be?

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

865. How NULL value has been defined in header files?

  1. strings.h and iostream.h
  2. ctype.h and conio.c
  3. conio.c and conio.h
  4. StandardIIbrary.h and Stddef.h

866.A Matrix can be composed of Int, floats or doubles as their elements.

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

867.”setprecision” manipulator will set

  1. The number of digits after the decimal point
  2. The number of digits before the decimal point
  3. The number of digits in a number
  4. None of the given options

868.Which of the following option will be true, if we overload “-=” 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

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

  1. Arr[0]
  2. Arr8]
  3. Arr[7]
  4. Arr[-1]

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

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

871.Array is a data structure?

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

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

  1. True
  2. False

873.When we define an array of objects?

  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

874.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 constructor414
  4. Constructor is called first before allocating memory

875.We can delete an array of objects without specifying [] brackets

  1. True
  2. False

876.The second parameter of operator functions for << and >> are objects of the class

For which we are overloading these operators.

  1. True
  2. False

877.Which is correct way to initialize a variable x of int type with

value 1

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

878.Default mechanism of function calling in array is and in case of

variable?     

  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

879.What does STL stand for?

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

880.Skill is that needed by programmer’s                                             

  1. Paying attention to detail
  2. Think about the reusab

  1. ility.    
  2. Think about user interface
  3. All of the given options4 & 5

881.For which array the size of the array should be one more than the number of

elements in an array?

  1. int
  2. double
  3. float
  4. char

882. When m allocation and free are for new and delete?       

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

883.Friend functions are of class.

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

884.The prototype of friend functions must be written the class ?

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

885.If overloaded plus operator is implemented as non-member function then which of the following statement will be true for the statement given below?

  1. obj3 = obj1 + obj2 ;
  2. obj2 will be passed as an argument to + operator whereas obj2 will
  3. drive the + operator
  4. obj1 will drive the + operator whereas obj2 will be passed as an argument to + operatorBoth objects (obj1
  5. obj2 will be passed as arguments to the + operator
  6. Any of the objects (obj1, obj2 can drive the + operator

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

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

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

  1. True
  2. False

889.The programs, in which we allocate static memory will be run?

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

890.The default value of a parameter can be provided inside the            

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

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

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

892.When an operator function is defined as member function for a binary Plus (+ operator then the number of

  1. argument it take is/are.
  2. Zero
  3. One
  4. Two371
  5. N arguments

893.When a call to a user-defined function finishes, the variable defined inside the function is still in existence?

  1. True 
  2. False

894.The precedence of an operator can be changed through operator overloading?

  1. True
  2. False

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

896.”lete” operator is used to return memory to free store, which is allocated by the “new” operator?

  1. True332
  2. False

897.Pointer is a variable which store

  1. Data  
  2. Memory
  3. Address
  4. Data Type
  5. Values

898.All preprocessor directives are started with the symbol?           .

  1. .           *
  2. +
  3. @
  4. #

899.Within the statement obj1=obj2;   obj1 will call the assignment operator function and obj2 will be passed as an argument to function?  

  1. False
  2. True

900.What is the sequence of event  when de allocating memory using delete operator?

  1. Only block of memory is deallocated for objects
  2. Only destructor is called for objects
  3. Memory is deallocated first before calling destructor
  4. Destructor is called first before deallocating memory