Cs201 MCQ Samar
Cs201 MCQ Samar
mcq A B C D Ans
1 ofstream is used for________ Input file stream Output file stream Input and output file stream All of the given B
Before the return statement in
2 Function prototype is written Within main function After the return statement in main Before call of that function A
main
Redundant Array of Inexpensive Redundant Array of Inexperience Redundant Array of Reduced Array of Inexpensive
4 RAID stands for________ C
Dices Devices Inexpensive Devices Devices
5 If int sum = 54; Then the value of the following statement is sum = sum - 3 ; 52 50 51 57 B
6 In while loop the loop counter must be initialized, With in the loop Before entering the loop At the end of the loop None of the given options B
7 Computer can understand only __________language code High level Low level Machine Fourth generation C
Transpose of a matrix means that when we interchange rows and the first row becomes the Last the first row becomes the first the Last row becomes the first the first column becomes the first
8 columns_____________ B
column column column row
9 Loops are _________ Structure Decision Sequential Repetition None of the given options C
10 C is widely known as development language of _______ operating system Linux Unix Windows Mac OS B
11 In_________, we try to have a precise problem statement Analysis Design Coding None of the given A
12 _________ Keyword is used to return some value from a function. break return continue goto B
13 Pointers store the ________ value of a variable memory address characters None of the given B
14 < , <= , > , >= are called ________ operators. Arithmetic Logical Relational Conational B
15 the sizeof operator is used to determine the size of data variable data type None of the given D
16 If int a = 50; then the value of a/= 3; will be, 15 16 17 18 B
_________are conventional names of the command line parameters of the „main()‟
17 function. „argb‟ and „argv‟ „argc‟ and „argv‟ argc‟ and „argu‟ None of the given B
From following; which one is the correct syntax of an array initialize: Array size is 10 and it
18 is of double data type to value 0? arr[10] = {0.0}; double arr[10]= 0.0; double arr[10] = {0.0}; double arr[] = 0.0; C
19 ________ statement interrupts the flow of control. switch continue goto break D
Both equal and double equal
20 From the following; which one is used as an assignment operator? Equal sign „=‟ Double equal sign „==‟ None of the given options A
sign
21 There are mainly _________ types of software 2 3 4 5 A
22 When x = 7; then the expression x%= 2; will calculate the value of x as, 1 3 7 2 A
23 A pointer variable can be, Decremented only Incremented only Multiplied only Both 1 and 2 D
24 set precision is a parameter less manipulator. TRUE FALSE A
25 We can change a Unary operator to Binary operator through operator overloading. TRUE FALSE B
delete operator is used to return memory to free store which is allocated by the new
26 operator TRUE FALSE A
When we do dynamic memory allocation in the constructor of a class, then it is necessary
7 to provide a destructor. TRUE FALSE A
Parameterized constructor will
Default constructor will call for first
Default constructor will call for Parameterized constructor will call call for first 2 objects and
What is the functionality of the following statement? String str[5] = {String(“Programming”), 3 objects and Parameterized C
all objects of array for all objects of array default constructor for
28 String(“CS201”)}; constructor for remaining objects
remaining objects
Only block of memory is Only constructor is called for Memory is allocated first Constructor is called first before
29 What is the sequence of event(s) when allocating memory using new operator? D
allocated for objects objects before calling constructor allocating memory
TRUE FALSE A
30 Deleting an array of objects without specifying [] brackets may lead to memory leak
Which of the following data type will be assumed if no data type is specified with
31 constant? short float int double C
What will be the correct syntax of the following statement? ptr is a constant pointer to
33 integer. const int *ptr ; const *int ptr ; int const *ptr ; int *const ptr ; C
34 Overloaded member operator function is always called by _______ Class Object Compiler Primitive data type B
35 Loader loads the executable code from hard disk to main memory TRUE FALSE A
Which of the following is the correct C++ syntax to allocate space dynamically for an array
36 of 10 int? new int(10) ; new int[10] ; int new(10) ; int new[10]; B
The prototype of friend functions must be written ____ the class and its definition must be
37 written ____ inside, inside the class inside, outside the class outside, inside the class outside, outside the class B
38 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 B
39 To perform manipulation with input/output, we have to include _____ header file. iostream.h stdlib.h iomanip.h fstream.h A
40 The endl and flush are _______ Functions Operators Manipulators Objects C
If we want to use stream insertion and extraction operators with _______ then we have to
41 overload these operators. int, float, double objects of class int, float, object int, char, float B
42 The static data members of a class can be accessed by ________ only class only objects both class and objects none of given options A
43 Classes defined inside other classes are called ________ classes looped nested overloaded none of the given options. B
A status code determining
A pointer to the class. An object of the class. whether the class was Destructors do not return a value. D
44 Which value is returned by the destructor of a class? destructed correctly
Consider the following code segment: class M {friend int operator!(const M &);}; Let Member function Non-member function Binary operator function None of the given options B
45 assume if s is an object of the class then function is implemented as ___________
compiler does member wise compiler does not allow default member of the class are not
None of the given options C
46 When the compiler overloads the assignment (=) operator by default then __________ assignment. overload of assignment (=) operator assigned properly
If text is a pointer of class String then what is meant by the following statement? text = Creates an array of 5 string Creates an array of 5 string objects Creates an array of pointers to
47 new String [5]; Creates a string Object B
objects statically dynamically string
48 Static variable which is defined in a function is initialized __________. Only once during its life time Every time the function call Compile time of the program None of the above A
The appropriate data type to store the number of rows and colums of the matrix
49 is____________. float int char none of the given options. B
Both Dynamic and Static
50 Copy constructor becomes necessary while dealing with _______allocation in the class. Dynamic memory Static memory None of the given options A
memory
51 seekg() and write() are functionally _________________ Different Identical Two names of same function None of the above A
A pointer variable can not be
52 When a pointer is incremented, it actually jumps the number of memory addresses According to data type 1 byte exactly 1 bit exactly A
incremented
3 setw is a parameterized manipulator. TRUE FALSE A
54 eof( ), bad( ), good( ), clear( ) all are manipulators. TRUE FALSE A
55 In functions that return reference, use __________variables. Local Global Global or static None of the given option C
Class-Name operator + (Class-
56 The declarator of Plus (+) member operator function is operator Class-Name + ( ) operator Class-Name + ( rhs) Class-Name operator + ( ) A
Name rhs)
57 The compiler does not provide a copy constructor if we do not provide it. TRUE FALSE B
What is the functionality of the following syntax to delete an array of 5 objects named arr
58 allocated using new operator? delete arr ; Deletes all the objects of array Deletes one object of array Do not delete any object Results into syntax error C
Only block of memory is Only constructor is called for Memory is allocated first Constructor is called first before
59 What is the sequence of event(s) when allocating memory using new operator? D
allocated for objects objects before calling constructor allocating memory
Only block of memory is Memory is deallocated first Destructor is called first before
60 What is the sequence of event(s) when deallocating memory using delete operator? Only destructor is called for objects D
deallocated for objects before calling destructor deallocating memory
61 new and delete operators cannot be overloaded as member functions. TRUE FALSE B
62 The operator function of << and >> operators are always the member function of a class. TRUE FALSE B
63 A template function must have at least ---------- generic data type 0 1 2 3 B
64 If we do not mention any return_value_type with a function, it will return an _____ value. int void double float A
Suppose a program contains an array declared as int arr[100]; what will be the size of
65 array? 0 99 100 101 C
66 The name of an array represents address of first location of array element. TRUE FALSE A
67 Reusing the variables in program helps to save the memory TRUE FALSE A
Creates an object and calls the
Which of the following option is true about new operator to dynamically allocate memory to The new operator determines Allocates memory to object and
constructor to initialize the All of the given options B
68 an object? the size of an object returns pointer of valid type
object
69 new and delete are _____ whereas malloc and free are _____. Functions, operators Classes, operators Operators, functions Operators, classes C
Friend function must be It can be declared anywhere in
Friend function must be Friend function must be declared
declared at the top within class class as these are not affected by D
declared after public keyword. after private keyword.
70 Which of the following statement is best regarding declaration of friend function? definition. the public and private keywords.
71 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 B
72 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 B
The operator function will be implemented as _____, if obj1 drive the - operator whereas
obj2 is passed as arguments to - operator in the statement given below. obj3 = obj1 - Member function Non-member function Friend function None of the given options A
73 obj2;
Which one of the following is the declaration of overloaded pre-increment operator
74 implemented as member function? Class-name operator +() ; Class-name operator +(int) ; Class-name operator ++() ; Class-name operator ++(int) ; C
75 The static data members of a class are initialized _______ at file scope within class definition within member function within main function B
78 Automatic variable are created on ________. Heap Free store static storage stack A
79 In C/C++ the string constant is enclosed In curly braces In small braces In single quotes In double quotes D
80 The size of int data type is 1 bytes 2 bytes 3 bytes 4 bytes D
81 In Flow chart process is represented by Rectangle Arrow symbol Oval Circle C
82 If the break statement is missed in switch statement then, The compiler will give error This may cause a logical error No effect on program Program stops its execution C
When we are using const keyword with a variable x then initializing it at the time of
83 declaration is, Must Optional Not necessary A syntax error A
Which of the following is the correct way to assign an integer value 5 to element of a
84 matrix say „m‟ at second row and third column? m[2][3] = 5 ; // [row][col] m[3][2] = 5 ; m[1][2] = 5 ; m[2][3] = „5‟; A
85 How many total elements must be in two-dimensional array of 3 rows and 2 columns? 4 5 6 7 C
86 Which of the following is the correct statement for the following declaration? const int *ptr. ptr is a constant pointer ptr is constant integer pointer ptr is a constant pointer to int ptr is a pointer to const int D
What will be the correct syntax to assign an array named arr of 5 elements to a pointer
87 ptr? *ptr = arr ; ptr = arr ; *ptr = arr[5] ; ptr = arr[5] ; A
88 C is a/an ______ language low level object based object oriented function oriented D
89 The variables having a name, type and size are just like empty boxes. TRUE FALSE A
90 If Num is an integer variable then Num++ means, Add 1 two times with Add 1 with Num Add 2 with Num Subtract 2 from Num B
91 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 C
92 Which of the following is a valid class declaration? class A { int x; }; class B { } public class A { } object A { int x; }; A
93 When we use manipulators in our program then which header file should be included? iostream.h stdlib.h stdio.h iomanip.h D
94 We can also create an array of user define data type. TRUE FALSE A
95 The normal source of cin object is, File Disk Keyboard RAM C
96 A stream is an ordered sequence of bytes. TRUE FALSE A
We can delete an array of objects without specifying [] brackets if a class is not doing
97 dynamic memory allocation internally. TRUE FALSE A
The second parameter of operator functions for << and >> are objects of the class for
98 which we are overloading these operators. TRUE FALSE A
no looping process checks the test
99 Which looping process checks the test condition at the end of the loop? for while do while C
condition at the end
all loops are executed the cannot be determined without
100 In a group of nested loops, which loop is executed the most number of times? the outermost loop the innermost loop B
same number of times knowing the size of the loops
101 Template class can not have static variables. TRUE FALSE B
i. int arr[2][3] = {4, 8, 9, 2, 1, 6} ; ii. int arr[3][2] = {4, 8, 9, 2, 1, 6} ; iii. int arr[][2] = {{4,8},{9,
2},{1, 6}} ; Which of the following option(s) are correct to initialize a two-dimensional array (ii) only (iii) only (ii) and (iii) and (iii) A
102 with 3 rows and 2 columns?
There is a pointer variable named ptr of type int then address of which type of variable the
3 ptr will store in it? variable of type char variable of type short variable of type int variable of type double C
Let suppose Union intorDouble{ Int ival; Double charvar; }; main(){ intorDouble VAZ; int
size ; size = sizeof(VAZ); } What will be the value of variable "size", if int occupies 4 bytes 2 4 8 12 C
104 and double occupies 8 bytes?
105 new and delete are _____ whereas malloc and free are _____. Functions, operators Classes, operators Operators, functions Operators, classes C
The member functions of a class occupy _____ region in memory for ____ object(s) of
106 class. separate, each common, all different, each different, all A
107 Friend functions are _____ of a class. Member functions Public member functions Private member functions Private member functions D
Precedence of an operator can The parity (number of operands) No new operators can be Associativity of an operator can be
108 Which of the following is true while overloading operators? A
be changed can be changed created changed
Minus (-) and = operators need the -= operator need to be the - and = operators need to
109 Which of the following option will be true to overload the -= operator? Non of given C
to be overloaded overloaded explicitly be overloaded implicitly
110 The input/output streams; cin and cout are ____ Operators Functions Objects Structures C
111 dec, hex, oct are all __________ Member functions Objects of input/output streams Parameterized manipulators Non-parameterized manipulators C
112 What will be the output of the following statement? cout << setbase(16) << 52 ; 52 34 61 74 B
The first parameter of overloaded stream insertion operator is _________ where second
113 parameter is _______ input stream, object of class object of class, output stream output stream, object of class object of class, input stream C
114 We can also do conditional compilation with preprocessor directives. TRUE FALSE A
With user-defined data type variables (Objects), self assignment can produce
115 __________. Syntax error Logical error Link error Non of the given options B
class for which we overload this reference of ostream class reference of istream class
116 The return type of the operator function for >> operator is ________. void C
operator (ostream&) (istream&)
Constructor of enclosing class Constructor of inner object will be Constructor and Destructor will
117 When an object of a class is defined inside an other class then, None of the given options B
will be called first called first be called simultaneously
118 Where we can include a header file in the program? any where in start at the end none of the given options. B
119 A function that calls itself is known as Iterative function Inline function Recursive function main () C
looks like any function call, creates but cannot initialize an is made automatically when an
never takes any arguments D
120 The function call to a default constructor except there is no return value object object is created
must be declared inside the
have multiple copies for the
class definition, but defined must be declared private can access only static data D
121 Static member functions entire class
outside it
122 The reserved words public and private comes under the category structures strings accessibility modifiers types of functions C
123 A for loop usually consist of __________ expressions. 1 2 3 4 C
124 A preprocessor directive is identified by _________ symbol # { ( ~ A
125 Which of the following operators can not be overloaded? new delete += sizeof D
a class definition has to an an object declaration has to an a variable has to a variable a variable declaration has to the
126 A function declaration has the same relationship to a function definition that A
object definition object declaration variable itself
template < class T >, Here T
template < class class_type> template < class data_type> can be replaced with any name class class-name() C
127 When we write a class template the first line must be: but it is preferable.
To all data member and Only to other friend functions of the Only to private data of the
128 A friend function of a class has access Only to public data of the class A
functions of the class class class
can allocate an appropriate
is used to declare objects or can not create and initialize an returns an address to an object or
amount of memory for an C
129 The new operator variables object variable
object or variable
If we open a file stream myfile for reading, what will give us the current position of the file
130 pointer? tellg() tellp() seekg() seekp() A
131 There is a class Student, Which one of the following is a valid destructor for this class. Student(); Student(int); ~ Student(); ~ Student(int); C
creates an object initialized with creates a new object that later may creates a new object that later
takes an arbitrary number of
the same data as an existing be assigned the data of an existing may be assigned the data of B
132 A copy constructor arguments
object object an existing object
133 To access the 8th element of an int array named myArray of 15 elements, you would write int[8] int[7] myArray[7] myArray[8] C
an object is initialized with an object is initialized with a
an object is initialized with another an object is not initialized when it‟s
another object data of the same variable of a basic type when A
134 A copy constructor is always called when object of any class when it‟s created created
class when it‟s created it‟s created
135 Constructor is itself a __________ of C++ and ___________. class , can be overloaded function , cannot be overloaded function, can be overloaded object, can not be initialized C
Both built-in and user-defined
136 The stream insertion and extraction operators are not already overloaded for ______ Built-in data types User-defined data types None of the given options B
types
Compiler will generate an error: „a'
Compiler will compile
Compiler will show a warning to you Null value will be assigned to a declared as reference but not D
137 Look at the statement given below int & a; and tell what will happen ? successfully
initialized
C++ provides member functions, which control the formatting to be performed during
138 stream I/O operations. TRUE FALSE B
The function will return a reference to the global variable that exists throughout the
139 program and thus there will be no danger of _______________. garbage collection dangling reference. wastage of memory system crash B
140 If an array has 50 elements, what is allowable range of subscripts? 0 – 49 1 – 49 0 – 50 1 – 50 A
char name [] = “Hello World” ; In the above statement, a memory of _________
141 characters will be allocated 13 12 11 10 C
142 The destructor is used to ______________. allocate memory allocate memory create objects allocate static memory B
Can be passed by value or
143 The first parameter of operator function for << operator _________________. Must be passed by value Must be passed by reference Must be object of class B
reference
144 Array is a data structure which store Memory addresses Variables Data Type Data A
In C/C++ if we define an array of size eight (8) i.e. int Arr [8]; then the last element of this
145 array will be stored at, Arr[0] Arr[8] Arr[7] Arr[-1] C
146 When an array is passed to a function then default way of passing this array is, By data By reference By value By data type B
Destructor will call once for Destructor will call for each object of
147 When we define an array of objects then, Destructor will never call Depends on the size of array B
whole array the array
Only block of memory is Only constructor is called for Memory is allocated first Constructor is called first before
148 What is the sequence of event(s) when allocating memory using new operator? C
allocated for objects objects before calling constructor allocating memory
We can delete an array of objects without specifying [] brackets if a class is not doing
149 dynamic memory allocation internally. TRUE FALSE B
The second parameter of operator functions for << and >> are objects of the class for
150 which we are overloading these operators. TRUE FALSE A
151 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 ; B
Default mechanism of function calling in case of array is _____ and in case of variable is
152 ___. Call by value, call by reference Call by referene, call by reference Call by reference, call by value Call by value, call by value C
153 What does STL stand for? Source template library Standard template library Stream template library Standard temporary library B
154 ________. Paying attention to detail Think about the reusability Think about user interface All of the given options D
For which array, the size of the array should be one more than the number of elements in
155 an array? int double float char D
156 Friend functions are _____ of a class Member functions Public member functions Private member functions Non-member functions D
obj2 will be passed as an obj1 will drive the + operator Both objects (obj1, obj2) will be
Any of the objects (obj1, obj2) can
If overloaded plus operator is implemented as non-member function then which of the argument to + operator whereas whereas obj2 will be passed as an passed as arguments to the + A
drive the + operator
157 following statement will be true for the statement given below? obj3 = obj1 + obj2 ; obj2 will drive the + operator argument to + operator operator
158 For cin, the source is normally a ________ and destination can be ______. File, native data type Disk, user-define type Keyboard, variable File, user-define type C
159 The programs, in which we allocate static memory, run essentially on ________ Heap System Cache None of the given options Stack D
both function prototype or
160 The default value of a parameter can be provided inside the ________________ function prototype function definition none of the given options. B
function definition
While calling function, the arguments are assigned to the parameters from
161 _____________. left to right. right to left no specific order is followed none of the given options. C
When an operator function is defined as member function for a binary Plus (+) operator
162 then the number of argument it take is/are. Zero One Two N arguments D
With user-defined data type variables (Objects), self assignment can produce
163 __________. Syntax error Logical error Link error Non of the given options B
164 Assignment operator is used to initialize a newly declared object from existing object. TRUE FALSE A
In the order in which they are
165 In the member initializer list, the data members are initialized, From left to right From right to left None of the given options C
defined within class
166 new operator allocates memory from free store and return _____________. A pointer A reference An integer A float A
167 "new" and "delete" keywords are _____________ in C++ language. Built-in- Function Operators Memory Allocation Function None of the given options C
168 We can also use member functions with cin and cout objects TRUE FALSE B
If the statements int j,k; j = 123; k= 234; int* q, * r; cout < < *q < < ' ' < < * r ; are executed,
169 what will be displayed? The values of j and k The addresses of q and r The addresses of j and k garbage values D
170 Which one of the following operators is a unary operator? OR ( || ) AND ( &&) XOR ( ^ ) Complement operator ( ~ ) D
171 The statement i++; is equivalent to i = i + i; i = i + 1; 3) : i = i - 1; i --; B
172 A variable which is defined inside a function is called Automatic variable Global variable Functional variable None of the given option C
173 Application Softwares are use to Type letters Control computer hardware Solve end user problems Develop Graphics C
174 When a macro takes arguments then it is called_________________. Function Procedure Parameterized macro Simple macro C
175 By default an array of characters is passed by value to a function, TRUE FALSE B
176 Using dynamic memory is more efficient then the static memory. TRUE FALSE A
177 Using dynamic memory is more _____________ then the static memory. Costly Expansive Efficient Difficult C
178 Before exiting the program, make sure that the allocated memory has freed. TRUE FALSE A
179 The default constructor has no arguments TRUE FALSE A
180 The data members of the class are initialized at runtime TRUE FALSE A
181 The data members of the class are initialized at creation Time TRUE FALSE B
182 Explicitly write keyword private in the class definition TRUE FALSE A
183 this is a pointer which always points to the current object. TRUE FALSE A
The function free() returns back the allocated memory got thorough calloc and malloc to
184 _____ . stack heap stack and heap None of the given options B
185 Whenever new operator is used, no number of bytes or sizeof operator is required. TRUE FALSE A
If the memory in the free store is not sufficient enough to fulfill the request, malloc()
186 function returns NO pointer. TRUE FALSE B
must be having a prototype with can access the private data of the cannot access the data must be invoked by the class that
187 A friend function B
no arguments class that declares it a friend members of a class declares it a friend
188 Operator Overloading is quite similar to Function Overloading. TRUE FALSE A
189 There are two types of operators to overload: unary and binary. TRUE FALSE A
Class-Name operator - (Class-
190 The declarator of Minus(-) member operator function is operator Class-Name - ( ) operator Class-Name - ( rhs) Class-Name operator - ( ) A
Name rhs)
Operator functions written as non-members but friends of the class, get both the operands
191 as their arguments. TRUE FALSE A
192 We cannot do arithmetic with references like pointers. TRUE FALSE A
193 In functions that return reference, use global or static variables. TRUE FALSE A
194 In functions that return reference, use only static variables. TRUE FALSE B
The reference data types are used as ordinary variables without any dereference
195 operator. TRUE FALSE A
196 We can create a new operator through operator overloading. TRUE FALSE B
Right object of the assignment Left object of the assignment Both objects will call the No object will call the assignment
197 In overloading the assignment (=) operator, which object will call the operator function? C
operator operator assignment operator operator
Certain overloaded operators can The precedence of an operator
New operators can never be Overloading cannot change how an
change the number of arguments cannot be changed by B
198 Which statement about operator overloading is false? created operator works on built-in types.
they take. overloading.
199 Initializing the data members in the definition of the class is ___________ syntax error logical error not an error none of the given options B
When an array of object is created dynamically then there is no way to provide
200 parameterized constructors for array of objects. TRUE FALSE A
If we define an identifier with the statement #define PI 3.1415926 then during the
201 execution of the program the value of PI __________. can not be replaced None of the given options Remain constant can be changed by some operation C
The default constructor is defined by the C++ compiler automatically for every class that TRUE FALSE A
202 has no default constructor (parameterless constructor) defined already.
The default constructor (parameterless constructor) is called for each element in the array
203 allocated with new. TRUE FALSE A
204 The new operator returns a Type *, accepts a parameter of type size_t. TRUE FALSE B
205 The new operator returns a void *, accepts a parameter of type size_t. TRUE FALSE A
The delete operator returns nothing (void) and accepts a pointer of void * to the memory
206 block. TRUE FALSE A
The delete operator returns nothing (void) and accepts a pointer of type * to the memory
207 block. TRUE FALSE B
By overloading new and delete operators, only allocation and deallocation part can be
208 overridden. TRUE FALSE A
209 new and delete can overload in c++ TRUE FALSE B
By overloading the array operator ( [] ), one can implement mechanism to check for array
210 bound. TRUE FALSE A
Stream insertion ( << ) and extraction operators ( >> ) are always implemented as
211 ___________ functions. Member non-member Inside Out Side B
212 For operator >>, the second parameter must also be passed by reference. TRUE FALSE A
creates an object initialized creates a new object that later may
copies the data of any two
takes no arguments with the same data as an be assigned the data of an existing C
213 A copy constructor constructors in that class
existing object object
214 A class can contain instances of other classes as its data members. TRUE FALSE A
215 The inner data members of the object are constructed and then the object itself. TRUE FALSE A
The order of destruction of an object is equle to this construction order, where the outer
216 object is destroyed first before the inner data members. TRUE FALSE B
217 Initializer list is used to initialize the inner objects at the construction time. TRUE FALSE A
In C++, we can have structures or classes defined inside classes. Classes defined within
218 other classes are called ________ classes. nested Child Parent Branch A
219 The template functions do NOT promote the code reuse TRUE FALSE B
220 It is possible to define a class within another class. TRUE FALSE A
221 When ever dynamic memory allocation is made in C/C++, it is freed_____________. Explicitly Implicitly Both explicitly and implicitly None of the given options A
222 User-defined manipulators are allowed in c++. TRUE FALSE A
It is a way of reusing the code when we contain objects of our already written classes into
223 a new class, TRUE FALSE A
224 Structured Query Language is used for ______________ Databases Management Networks Writing Operating System none of the given options A
When it contain logical
225 In if structure the block of statements is executed only, Type letters When it contain arithmetic operators When the condition is true D
operators
226 Loader transfers the executable code from main memory to hard disk. TRUE FALSE B
Stops the execution of current
227 When break statement is encountered in switch statement, it Stops the entire program Exits from switch statement None of the given options C
statement