Quiz CS201 (110210)
Quiz CS201 (110210)
Quiz CS201 (110210)
2
The first parameter of operator function for << operator_______________.
Select correct option:
Must be passed by value
Must be passed by reference
Can be passed by value or reference
Must be object of class
malloc function returns__________to the _________________ from the available memory.
3
Select correct option:
NULL pointer, end of the chunk of memory allocated from the stack
void pointer , starting of the chunk of memory allocated from the heap
integer pointer, middle of the chunk of memory allocated from the heap
void pointer, starting of the chunk of memory allocated from the array
4
When an operator function is define as member function for a Unary operator then the number of
argument it take is/are,
Select correct option:
Zero
One
Two
N arguments
5
Overloaded assignment operator must be
Select correct option:
Member function of class
Non-member function of class
Friend function of class
Global function
6
Functions declared with the_______________ specifier in a class member list are called friend
functions of that class.
Select correct option:
protected
private
public
friend
7
The friend function of a class can have access_______________.
Select correct option:
to the public data members only
to the private data members
to the protected data members
to the main program
8
Once we have defined a symbolic constant value using #define, that value _________during
program execution
Select correct option:
can be changed
cannot be changed
varies
becomes zero
9
When a variable is defined as static in a class then___________.
Select correct option:
Separate copy of this variable is created for each object
Only one copy is created for all objects of this class
A copy of this variable is created for only static objects.
None of the given options
10
Stream operators are heavily overloaded means , they allow to handle int and character data type
only.
Select correct option:
True
False
Remainder
Quotient
Divisor
None of the given options
True
False
inheritance
polymorphism
persistence
encapsulation
Underscore
Special character
Digit
None of the given options
Memory leak
Dangling pointer
NULL pointer
Unreferenced memory
sizeof operator
free operator
void pointer
new operator
nil
void
zero
null
0 – 49
1 – 49
0 – 50
1 – 50
BC090200600 : Sami Ul Haq 72
Time Left
sec(s)
conio.h
iostream.h
string.h
stdlib.h
Click here to Save Answ er & Move to Next Question
BC090200600 : Sami Ul Haq 44
Time Left
sec(s)
void (nothing)
void pointer
object pointer
int pointer
Click here to Save Answ er & Move to Next Question
Zero
One
Two
N arguments
Click here to Save Answ er & Move to Next Question
True
False
Click here to Save Answ er & Move to Next Question
1234
12345
Infinite loop
Click here to Save Answ er & Move to Next Question
Zero arguments
Dynamic memory
Static memory
C++
Java
FORTRAN
C
Click here to Save Answ er & Move to Next Question
A only
C only
A and B
A and D
Click here to Save Answ er & Move to Next Question
4 bytes in memory
2 bytes in memory
local variables
static variables
automatic variables
Click here to Save Answ er & Move to Next Question
one
four
two
wasted
used efficiently
used carelessly
inside that class and that has no access to the members of the
class
outside that class and that has the right to access public
members of the class only
outside that class and that has the right to access all members
of the class.
outside that class and that has the right to access all members
of the class.
Click here to Save Answ er & Move to Next Question
destructor
constructor
main program
default constructor
Click here to Save Answ er & Move to Next Question
Output
Input
Input/Output
data type
memory reference
value
in
out
app
ate
Click here to Save Answ er & Move to Next Question
MC080202140 : WAQAR NAEEM 45
Time
sec(s
Left
)
A cannot access B
Click here to Save Answ er & Move to Next Question
By reference
By value
Be a syntax error
Be a logical error
0128128?
0000128?
1280000
0012800
Click here to Save Answ er & Move to Next Question