Top 1000+ Object Oriented Programming (OOP) Subject Mcqs Pdf Download Set No 15
701.Suppose a program contains an array declared as int array [100]; what will be the size of array?
- 0
- 99
- 100
- 101
702.The name of an array represents address of first location of array element?
- True
- False
703.Reusing the variables in program helps to save the memory?
- True
- False
704.Which of the following option is true about new operator to dynamically allocate memory to an object?
- The new operator determines the size of an object
- Allocates memory to object and returns pointer of valid type
- Creates an object and calls the constructor to initialize the object
- All of the given options
705.New and delete are whereas M allocation and free are?
- Functions, operators
- Classes, operators
- Operators, functions
- Operators, classes
706.Like member functions can also access the private data members of a class.
- Non-member functions
- Friend functions
- Any function outside class
- None of the given options
707.Which of the following statement is best regarding declaration of friend function
- Friend function must be declared after public keyword.
- Friend function must be declared after private keyword.
- Friend function must be declared at the top within class definition.
- 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?
- Non-member function of class
- Member function of class
- Friend function of class
- None of the given options
709.For non-member operator function, object on left side of the operator may be?
- Object of operator class
- Object of different class
- Built-in data type
- 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?
- Member function
- Non-member function
- Friend function
- None of the given options
711………….. is the declaration/exploration of overloaded pre-increment operator in OOP which are implemented as member function?
- Class-name operator + (;
- Class-name operator + (int;
- Class-name operator ++ (;
- Class-name operator ++ (int
712.The static data members of a class are initialized?
- at file scope
- within class definition
- within member function
- within main function
713.Class is a user defined?
- data type
- memory referee
- value
- none of the given options.
714.We can also define a user-defines manipulators?
- True
- False
715.Automatic variable are created on?
- Heap
- Free store
- static storage
- stack
716.If Num is an integer variable then Num++ means?
- Add 1 two times with Num
- Add 1 with Num
- Add 2 with Num
- Subtract 2 from Num
717.If the return type of a function is void then it means that it will?
- Return any type of data
- Return some specific type of data
- Return no data
- Return just character data
718.Which of the following is a valid class declaration?
- class A {int x;};
- class B {}
- public class A {}
- object A {int x;};
- all
719.When we use manipulators in our program then which header file should be included?
- iostream’s
- stdlib.h
- stdio.h
- iomanip.h
720.We can also create an array of user define data type?
- True
- False
721.The normal source of Counter Input object is?
- File
- Disk
- Keyboard
- RAM.
722.A stream is an ordered sequence of bytes?
- True
- False
723.What is the sequence of event when allocating memory using new operator?
- Only block of memory is allocated for objects
- Only constructor is called for objects
- Memory is allocated first before calling constructor
- 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?
- True
- False
- True
- False
725.The second parameter of operator functions for << and >> are objects of the class for which we are overloading these operators?
- True
- False
726.Which looping process checks the test condition at the end of the look?
- for
- while
- do while
- 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?
- the outermost loop
- the innermost loop
- all loops are executed the same number of times
- cannot be determined without knowing the size of the loops
728.Template class cannot have static variables?
- True
- False
729.Consider the following statements to initialize a two-dimensional array.
- int arr[2][3] = {4, 8, 9, 2, 1, 6} ;
- D.int arr[3][2] = {4, 8, 9, 2, 1, 6} ;
- 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?
- (ii only
- (iii only
- (ii and (iii
- and (iii
731. A pointer variable named pointer of type int then address of which type of variable the pointer will store in it?
- variable of type char variable of type short
- variable of type int
- variable of type double
732.Let suppose
Union intorDouble Int ival;
Double charvar;
};
Main {
intorDouble VAZ;
int size;
size = sizeof(VAZ;
}
- Yes
- No
733.Calculate the value/worth of variable “size”, if int occupies 4/Four bytes and double occupies 8/Eight bytes?
- 2
- 4
- 8
- 12
734.new and delete are Memory Allocation and free are?
- Functions, operators
- Classes, operators
- Operators, functions
- Operators, classes
735.The member functions of a class occupy region in memory for objects of class?
- separate,
- common, all
- different, each
- different, all
736.Friend functions are of a class?
- Member functions
- Public member functions
- Private member functions
- Non-member functions
737.Which of the following is true while overloading operators?
- Precedence of an operator can be changed
- The arity (number of operands can be change
- No new operators can be created
- Associatively of an operator can be changed
738.Which of the following option will be true to overload the -= operator?
- only – operator needs to be overloaded
- Minus (- and = operators need to be overloaded
- the -= operator need to be overloaded explicitly
- the – and = operators need to be overloaded implicitly
739.The input/output streams; cin and cout are
- Operators
- Functions
- Objects
- Structures
740.dec, hex, oct are all
- Member functions
- Objects of input/output streams
- Parameterized manipulators
- Non-parameterized manipulators
741. What will be the output of the following statement? cout << setbase(16 << 52 ;)?
- 74
- 52
- 34
- 6
742.The first parameter of overloaded stream insertion operator is where second parameter is?
- input stream, object of class
- object of class, output stream
- output stream, object of class
- object of class, input stream
743.We can also do conditional compilation with preprocessor directives?
- True
- False
744.With user-defined data type variables (Objects, self assignment can produce); .
- Syntax error
- Logical error
- Link error
- None of the given options
745.The return type of the operator function for >> operator is? .
- class for which we overload this operator
- reference of ostream
- class (ostream& reference of istream
- H. class (istream& void
746.When an object of a class is defined inside another class ?
- Constructor of enclosing class will be called first
- Constructor of inner object will be called first
- K.Constructor and Destructor will be called simultaneously
- L.None of the given options
747.Where we can include a header file in the program?
- any where
- in start
- at the end
- none of the given options.
748. A template function must have at least generic data type?
- six
- One
- Two
- Three
749.Which of the following statement is best regarding declaration of friend function?
- Friend function must be declared after public keyword
- Friend function must be declared after private keyword.
- Friend function must be declared at the top within class definition.
- 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?
- Class-name operator + (;
- Class-name operator + (int;
- Class-name operator ++ (;
- Class-name operator ++int;