0% found this document useful (0 votes)
15 views12 pages

CS201 Quiz 3 Solved by Math Zone For Vu

subscribe youtube channel math zone for vu

Uploaded by

mathzone115
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views12 pages

CS201 Quiz 3 Solved by Math Zone For Vu

subscribe youtube channel math zone for vu

Uploaded by

mathzone115
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

CS201 -Quiz 3 solved by math zone for vu

SOLVED BY ''MATH ZONE FOR VU''


VU ALL PAID SERVICES AVAILABLE +923305516507
CS201 -Quiz 3 solved by math zone for vu
SOLVED BY ''MATH ZONE FOR VU''
VU ALL PAID SERVICES AVAILABLE +923305516507

1 The friend keyword provides access


_______________. Select the correct option
to the data members of the friend class only
in two directions
to all classes in one direction only
2 The members of a class declared without any
keyword are __________ by default Select the correct
option
Constant SOLVED BY ''MATH ZONE FOR VU''
VU ALL PAID SERVICES AVAILABLE +923305516507
Private
Public
protected
3 The malloc function takes ___________ argument(s).
Select the correct option
Four
Three
Two
one
4 1free function is available in _______________
header file. Select the correct option
string.h
iostream.h
conio.h
stdlib.h
5 Functions declared with the _________________
specifier in a class member list are called friend
functions of that class. Select the correct option

SOLVED BY ''MATH ZONE FOR VU''


VU ALL PAID SERVICES AVAILABLE +923305516507
CS201 -Quiz 3 solved by math zone for vu

Protected SOLVED BY ''MATH ZONE FOR VU''


Private VU ALL PAID SERVICES AVAILABLE +923305516507

Friend
public
6 Once we have defined a symbolic constant value
using #define, that value _________during program
execution.Select the correct option
Varies
becomes zero
can be changed
cannot be changed
7 Constructor is a special function, called whenever we
____________________. Select the correct option
instantiate an object of a class
create a function
destroy an object
create a class
8 The memory allocation functions return a chunk of
memory with a pointer of type_______________.
Select the correct option
Float
Integer
SOLVED BY ''MATH ZONE FOR VU''
Void VU ALL PAID SERVICES AVAILABLE +923305516507

Ptr
9 Which one of the following is mandatory preprocessor
directive for c++? Select the correct option
#undef <iostream>

SOLVED BY ''MATH ZONE FOR VU''


VU ALL PAID SERVICES AVAILABLE +923305516507
CS201 -Quiz 3 solved by math zone for vu

All of the given


#undef <iostream>
#include <iostream>
10The compiler use a name mangling technique to
_______________________. Select the correct
option
Generate unique functions
Run the functions
Compile the functions
Generate a unique token that is assigned to each
function
11C++ offers ____________ levels of data access
control inside a class Select the correct option
Five
Three
Four
Two
12a = a & b; can be written as_____________.Select the
correct option
a = b;
SOLVED BY ''MATH ZONE FOR VU''
a &= b; VU ALL PAID SERVICES AVAILABLE +923305516507

a=a & b;
a =& b
13 ________ is a special type of pointer we have to
cast it before we use it. Select the correct option
Void
Double
SOLVED BY ''MATH ZONE FOR VU''
VU ALL PAID SERVICES AVAILABLE +923305516507
CS201 -Quiz 3 solved by math zone for vu

SOLVED BY ''MATH ZONE FOR VU''


Float VU ALL PAID SERVICES AVAILABLE +923305516507

integer
14
we include the header file in the angle brackets the
compiler searches for it in ______________. Select the
correct option
specific directory
current directory
all the drives
current folder
15 If the memory in the free store is not sufficient,
____________________.Select the correct option
malloc function returns NULL pointer
malloc function returns 1
malloc function returns free space
malloc function returns 0
161If the request of new operator is not fulfilled due to
insufficient memory in the heap
____________________. Select the correct option
free operator returns nothing
the new operator returns 2
the new operator returns 1
the operator returns 0

SOLVED BY ''MATH ZONE FOR VU''


VU ALL PAID SERVICES AVAILABLE +923305516507

SOLVED BY ''MATH ZONE FOR VU''


VU ALL PAID SERVICES AVAILABLE +923305516507
CS201 -Quiz 3 solved by math zone for vu

17 The function overloading


requires__________________. Select the correct
option
the arguments of integer type only
the argument list to be different.
no arguments
the argument list to be the same
18 Macros are categorized into _________
type(s).Select the correct option
One
SOLVED BY ''MATH ZONE FOR VU''
Four VU ALL PAID SERVICES AVAILABLE +923305516507

tWo
three
19 What is the other name for a variable?Select the
correct option
Identifier
Static
Constant
Visual
20 An instance of a class is called ________________.
Select the correct option
data type
member function
structure
object
21getche() is a _____________ function and defined in
___________ header file. Select the correct option

SOLVED BY ''MATH ZONE FOR VU''


VU ALL PAID SERVICES AVAILABLE +923305516507
CS201 -Quiz 3 solved by math zone for vu

user-define function , conio.h


built-in function, stlib.h
built-in function , conio.h
built -in function, iostream.h
22 If class A is a friend of class B, and class B is a friend
of class C. If class A wants class C to be a friend,
__________________ Select the correct option
it has to declare , class A as a friend
it has to declare, class C as a friend
it has to declare, class B and class A as friend
classes
it has to declare, class B as a friend
23 Initializing the data member within the class is
_____________. Select the correct option
not an error
a logical error
a syntax error
a run time error
24Windows operating system may itself takes memory
from ___________. Select the correct option
Stack
Lists
SOLVED BY ''MATH ZONE FOR VU''
Array VU ALL PAID SERVICES AVAILABLE +923305516507

heap

25 The members of a class declared without any


keyword are __________ by default Select the
correct option
SOLVED BY ''MATH ZONE FOR VU''
VU ALL PAID SERVICES AVAILABLE +923305516507
CS201 -Quiz 3 solved by math zone for vu

Public
Private
SOLVED BY ''MATH ZONE FOR VU''
VU ALL PAID SERVICES AVAILABLE +923305516507
Protected
constant
26 symbolic constant PI can be defined as: Select the
correct option
#define PI 3.14 ;
#define PI 3.14
#define PI=3.14
# include pi= 3.14
27 All the preprocessors directives starts with ________.
Select the correct option
#
$ SOLVED BY ''MATH ZONE FOR VU''
VU ALL PAID SERVICES AVAILABLE +923305516507
&
_
28 The destructor is used to ______________. Select
the correct option
create objects
allocate static memory
deallocate memory
allocate memory
29 Destructor _______________________.Select the
correct optiontakes no arguments and can be
overloadedcan be overloaded and have return type
SOLVED BY ''MATH ZONE FOR VU''
VU ALL PAID SERVICES AVAILABLE +923305516507
CS201 -Quiz 3 solved by math zone for vu

cannot be overloaded and have return type


cannot be overloaded and have no return type
30 a ^= b; can be written as_________________.Select
the correct option
a = a ^ b;
a = a^+b;
a^= a + b;
a = b ^ a;
31 _________ is a special type of pointer we have to
cast it before we use it. Select the correct option
Float
integer
double
void
32 The name of the destructor is the same as that of a
class proceeding with a __________________ Select
the correct option
~ sign
# sign& SOLVED BY ''MATH ZONE FOR VU''
VU ALL PAID SERVICES AVAILABLE +923305516507
Sign
@ sign
33 What will be the output of the following c++ code?
#include<iostream.h>
#define max 100main(){
#ifdef max Cout<<”Hellow;
}
Select the correct option

SOLVED BY ''MATH ZONE FOR VU''


VU ALL PAID SERVICES AVAILABLE +923305516507
CS201 -Quiz 3 solved by math zone for vu

Max is 100
Hello
“Hellow”
Error
34 The heap memory structure __________. Select the
correct option
is just like stack
contains no spacer
mains constant
constantlychanges in size
35 The new operator automatically determines the size
of memory required to store that object , so it does not
need ______________. Select the correct option
dot operator
free operator
size off operator
sizeof operator
361If class A is a friend of class B, and class B is a
friend of class C. If class A wants class C to be a
friend, __________________ Select the correct
optionit has to declare, class B and class A as friend
classes it has to declare, class C as a friendit has to
declare , class A as a friendit has to declare, class B
as a friend
37 A pointer with value NULL is defined in the header
files _____________and ___________. Select the
correct option

SOLVED BY ''MATH ZONE FOR VU''


VU ALL PAID SERVICES AVAILABLE +923305516507
CS201 -Quiz 3 solved by math zone for vu

stdlib.h ,stddef.h
conio.c ,getche()conio.h ,iostream.hprocess.h, stdi.h
38 Sometimes after allocating memory we need
additional space, for this purpose we use
______________. Select the correct option
void pointer
reallocation function
realloc function
calloc function
39For casting, we normally declare a pointer of type
_____________. Select the correct option
Void
NULLintegerwe are going to use
40 Default constructor generated by
______________does ______________for us. Select
the correct option
main program, memory management
compiler , initialization
classes , initialization
compiler, no initialization
41The friend functions are _____________. Select the
correct option
void functions
member of a class
not member of a class
inline functions

SOLVED BY ''MATH ZONE FOR VU''


VU ALL PAID SERVICES AVAILABLE +923305516507
CS201 -Quiz 3 solved by math zone for vu

SOLVED BY ''MATH ZONE FOR VU''


VU ALL PAID SERVICES AVAILABLE +923305516507

You might also like