Top 1000+ Object Oriented Programming (OOP) Subject Mcqs Pdf Download Set No 16
751.The user defined Class is?
- data type
- memory referee
- value
- 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 ; ?
- 3 bytes
- 6 bytes
- 12 bytes
- 24 bytes
753.Which of the following is the correct C++ syntax to allocate space dynamically for an array int?
- new int (10);
- new int [10];
- int new (10;
- int new [10];
754.A Pointer is a special variable that contain?
- Data value
- Memory Address
- Both data and values
- None of the given option
755.Reference Value Type Data The code is written to the program?
- implement
- design
- analysis
- none of the given options
756.Operator overloading can be performed through?
- Classes
- Function371
- Operators
- Reference
757.When a value is referred by a normal variable then it is known a?
- Direct Reference
- Indirect Reference.
- Partial Reference
- Proper Reference
758.Which of the following function is used to increase the size of already allocated memory
Chunk?
- malloc
- calloc
- realloc
- free
759.Which of the following is NOT a preprocessor directive?
- #Error
- #Define
- #Line
- #n defines
760.Two stream objects Cin and Cout are included in which header file
- iostream.h
- fstream.h
- istream.h
- ostream.h
761.Overloaded delete operator function takes the same parameter as an argument returned by new operator function?
- True
- False
762.When an array of object is created dynamically then there is no way to provide parameterized constructors for array of objects?
- True
- False
763.C is widely known as development language of operating system?
- Linux
- Windows
- Unix
- Mac OS
764.Computer can understand only machine language code?
- True
- False
765.We cannot define a function as a friend of a Template class?
- True
- False
766.What will be the value of ‘x’ and ‘y’ after executing the following statements?
X = 3;
y = x++;
- 3, 4
- 4, 4
- 3, 3
- 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;
}
- 6,8,6
- 6,6,8
- 6,8,8
- 6,6,6
768…… is used to trace the logic of the program and correct the logical errors?
- Compiler
- Editor
- Linker
- Debugger
769.New and delete are whereas mallocation?
- Functions, operators
- Classes, operators
- Operators, functions
- Operators, classes
- new and delete operators
770.The member functions, can also access the private data members of a class?
- Non-member function
- Friend functions
- Any function outside class
- None of the given options
771.Which situation would require the use of a non-member overloaded operator?
- The overloaded operator is an Assignment operator.
- The left most operand is an object of a class.
- The left operand is built-in data type.
- The operator returns a reference.
772.The stream insertion and stream extraction operators are already overloaded for?
- User-defined data types
- Built-in data types
- User-defined and built-in data types
- None of the given options
773.Which of the following function do NOT initialize the chunk of memory to all zero?
- calloc(function
- Both malloc (and calloc(
- None of the above
- mallocation function.
774.The function free (returns back the allocated memory got thorough c allocation and
M allocation to?
- stack
- heap
- stack and heap
- None of the given options
775.width is member function of?
- cin object
- cout object
- Both CIN and COUT object
- None of the given option
776.Templates are not type safe?
- true
- 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?
- Use templates
- Use strings to store all types
- None of the given options
779.In if structure the block of statements is executed only?
- When the condition is false
- When it contains arithmetic operators
- When it contains logical operator
- When the condition is true
780.Header file: fstream.h includes the definition of the stream classes?
- ifstream, fstream, cout
- ifstream, fstream, ofstream
- fstream, cin, cout
- None of the above
781.To access the data members of structure is used?
- dot operator
- operator
- operator
- None of given.
782. Bad (good(clear( all are manipulators)?
- True
- False
783.Which kind of functions can access private member variables of a class?
- Friend functions of the class
- Private member functions of the class
- Public member functions of the class
- Friend, private and public functions
784.The return type of operator function must always be void?
- True
- False
785.Friend function of a class is?
- Member function
- Non-member function
- Private function
- Public function
786.Function implementation of friend function must be defined outside the class?
- True
- False
787.The normal source of cin object is?
- File
- Disk
- Keyboard
- RAM
788.Which of the following is correct way to initialize a variable x of int type with value 10?
- int x; x = 10;
- int x = 10;
- int x, x = 10;
- 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 ;
}
- I 5, 5
- 10, 5
- 5, 10
- 10, 10
790.With template function, the compiler automatically detects the passed data and generates a new copy of function using passed data.
- True
- False
791.What will be the correct syntax to declare two-dimensional array of float data type?
- float arr{2}{2} ;
- float arr[2][2] ;
- float arr[2,2] ;
- float [2][2] arr;
792.The first parameter of operator function for << operator?
- Must be passed by value
- Must be passed by reference446
- F.Can be passed by value or reference
- G.Must be object of class
793.Heap is constantly changing in size?
- True
- False
794.While calling function, the arguments are assigned to the parameters from?
- left to right
- .right to left
- no specific order is followed
- none of the given options.
795.Classes defined inside other classes are called?
- classes
- looped
- nested
- overloaded
- none of the given options.
796.If we define an identifier with the statement
#defineP13.1415926 then during the execution of the program?
- the value of PI
- cannot be replaced
- None of the given options
- Remain constant
- V.can be changed by some operation
797.Which value is returned by the destructor of a class?
- A pointer to the class.
- An object of the class.
- A status code determining whether the class was destructed correctly
- Destructors do not return a value
798 All class contains?
- Constructor
- Destructor
- Both a constructor and a destructor
- None of the given options
799.A template function?
- One or more than one argument
- Only one argument
- Zero arguments
- None of the given options
800.Structured Query Language is used for?
- Databases Management5
- Networks
- Writing Operating System
- none of the given options