Top 1000+ Object Oriented Programming (OOP) Subject Mcqs Pdf Download Set No 17
801.Structure is a collection of a single name?
- Only Functions
- Only Variables
- Both Functions and Variables
- None of the given options
802. C++ syntax to allocate space dynamically for an array int?
- new int (10;
- new int [10];
- int new (10);
- int new [10];
804.Unary operator implemented as member function takes arguments whereas non-member function takes arguments?
- One, zero
- Zero, one
- One, two
- Two, one
805.The first parameter of overloaded stream insertion operator so where will be second parameter?
- input stream, object of class
- object of class, output stream
- output stream, object of class
- object of class, input stream
806.We can also do conditional compilation with preprocessor directives.
- True
- False
- True
- False
807. The symbolic constant has been defined it again.
- True
- False
808.The arguments are assigned to the parameters from
- left to right
- right to left
- no specific order is followed
- none of the given options.
809. when Classes will define inside other classes?
- classes
- looped
- nested
- overloaded
- none of the given options.
810.identifier with the statement #define PI 3.1415926 then during the execution of the program
Will be?
- the value of PI
- cannot be replaced
- None of the given options
- Remain constant
- can be changed by some operation
811.Assignment operator will be for associative?
- right
- left
- binary
- unary
812.If text will be a pointer of String Classes then what will be for the following statement?
text = new String [5];
- Creates an array of 5 string objects statically
- creates an array of 5 string objects dynamic
- Creates an array of pointers to string
- Creates a string Object
813.The return type of the operator function for << operator is?
- class for which we overload operator
- reference of O stream class (O stream&
- reference of stream class (istream&
- void
814.The code is written to the program.
implement
- design
- analysis
- none of the given options.
815.Memory allocated at run time is a system resource and what will be the responsibility of
- memory.
- System
- Programmer
- User of program
- None of given options
816.Templates will not safe type?
- True
- False
817.*.doc will by type.
- Sequential File
- Random Access File
- Data File
- Record File
818.Which of the following is NOT a preprocessor directive?
- #Error
- #Define
- #Line
- #Ndefine
819.The return type of operator function must always be void.
- True
- False
820.What does (*this represents?
- The current function of the class
- The current pointer of the class
- The current object of the class
- A value of the data member
821.The statement cin.get (; is used to,
- Read a string from keyboard
- Read a character from keyboard
- Read a string from file
- Read a character from file
822.When we do dynamic memory allocation in the constructor of a class, then it is necessary to provide a destructor.
- True
- False
823.Overloaded new operator function takes parameter of type size_t and returns
- void (nothing)
- void pointer
- object pointer
- int pointer
824.The second parameter of operator functions for << and >> are objects of the class overloading these operators.
A. True
B. False
825. C++ is a case-sensitive language
- True
- False
826.To include code from the library in the program?
- #include “iostream.h”
- include < iostream.h>
- include < iostream.h>
- #include < iostream.h>
827.A template function must have only generic data types.
- True
- False
828.Template class will not have static variables.
- True
- False
829.What will be the correct syntax to assign array of 5 elements to a pointer?
- *pointer = array;
- pointer = array;
- *pointer= array [5];
- pointer = array [5];
830.What will be the correct syntax to access the value of fourth element of an array using pointer
Pointer?
- Pointe [3]
- (ptr+3
- *(ptr+3
- Both 1and 3
831.The most significant bit of un-signed number is 1 then it represents a positive number.
- True
- False
832.I What is meant by a symbol & sign used with the variable name?
- Address of variable, reference variable
- Reference variable, value of variable
- Reference variable, address of variable367
- Address of variable, value of variable
833.How can conditional compilation with preprocessor directives.
- True272
- False
834.How can give the default value of a parameter can be inside the
function prototype?
- function definition
- both function prototype or function definition
- none of the given options.
835.Classes defined inside other classes are called?
- classes
- looped
- nested
- overloaded
- none of the given options.
836.What purpose of classes serve?
- Data encapsulation
- Providing a convenient way of modeling real-world objects
- Simplifying code reuse
- All of the given options
837.Every class contains
- Constructor
- Destructor
- Both a constructor and a destructor
- None of the given options
838. How will perform the new operator to allocate memory from the free store during?
- Compile Time
- Run Time
- Link Time
- None of the given options
839.When an object of a class is defined inside another class then?
- Destructor of enclosing class will be called first.
- Destructor of inner object will be called first
- Constructor and Destructor will be called simultaneously
- None of the given options
840. Is it possible to define a class within another class.
- True
- False
841.New and Delete are also used with and data types as well.
- Class, Objects
- Structures, Pointers
- Both Class and structures
- None of above
842. New keyword, data types and class members are initialized with meaningful values?
- True
- False
843.If it is required to copy an array to another array then?
- Both arrays must be of the same size and data type
- Both arrays may be of different size
- Both arrays may be of different data type
- Both arrays may be of different size and type
844. Which is best way for Dealing with structures and functions passing by reference is the most economical
- True
- False
845. Are all manipulators like Eof(,bad( , good( , clear?
- True
- False
846.Overloaded new operator function takes parameter of type Size-t and returns?
- void (nothing
- void pointer
- object pointer
- int pointer
847.When new operator is overloaded at global level then corresponding built-in new operator will not be visible to whole of the program.
- True
- False
848.If there is more than one statement in the block of a for loop, which will be of the beginning and the ending of the loop block?
- parentheses
- braces {}
- brackets []
- arrows < >
849.The return type of a function that do not return any value
- float
- int
- void
- double
850.UNIX will be developed in language.
- JAVA
- B
- C
- FORTRAN