CS201 Quiz 30 Lectures Files 2

No Comments

Question No. 1
The compiler generates __________________ automatically
member functions
classes
objects of a class
constructors

Question No. 2
Programmer should be very careful about the memory management because it can _____________.
cause problems of  memory leakage and dangling pointers
creates problems of NULL pointers
returns void pointers
affects the logic of the program

Question No. 3
getche() is a _____________ function and defined in ___________ header file.
user-define function , conio.h      
built-in function , conio.h
built-in function, stlib.h                 
built -in function, iostream.h

Question No. 4
If B is designated as friend of A, B can access A’s non-public members
B cannot access private member of  A
B cannot access protected member of A
A can access non-public members of  B
A cannot access B

Question No. 5
Unix operating system was written in ________ language
C++                 
Java
FORTRAN
C

Question No. 6
____________will return the number of bytes reserved for a variable or data type.
sizeof operator
free operator
void pointer
new operator

Question No. 7
Member functions of the class ______________main program
are not accessible
are accessible from
are defined within the
are private to 

Question No. 8
Memory allocated from heap or free store _____________________.
can be returned back to the system automatically
can be allocated to classes only
cannot be returned back unless freed explicitly using malloc and realloc
cannot be returned back unless freed explicitly using free and delete operators

Question No. 9
A class can be declared as a __________________ of other class.
member
member function
friend
part

Question No. 10
The name of the destructor is the same as that of a class proceeding with a __________________
& sign
# sign
@ sign
~ sign

Question No. 11
A reference cannot be _____________.
1
zero
NULL
Integer

Question No. 12
Header files provide ______________ so the program running on one operating system can run without an error on the other system.
accessibility
reliability
accuracy
portability

Question No. 13
We cannot use ______________ pointer for storing and reading data from it.
NULL
integer
double
zero

Question No. 14
Once we have defined a symbolic constant value using #define, that value _________during program execution
can be changed                             
cannot be changed
varies
becomes zero

Question No. 15
Constructor is itself a __________ of C++ and ___________.
class , can be overloaded
function , cannot be overloaded
function, can be overloaded
object, can not be initialized

Question No. 16
The default visibility for the data members of the class is
private
protected
public
accessible outside the class

Question No. 17
While using _________________ operator we do not need to supply number of bytes allocated.
insertion
dot
malloc
new

Question No. 18
Overloaded member operator function is always called by _______
Class
Object
Compiler
Primitive data type

Question No. 19
_____________data isn't accessible by non-member functions or outside classes
Public
private
Static
Globally declared

Question No. 20
C++ offers ____________ levels of data access control inside a class
three
four
two
five

Question No. 21
In C++ a variable can be declare anywhere in the program this will increase _______________.
writability
readability
portability
efficiency
Next PostNewer Post Previous PostOlder Post Home

0 comments

Post a Comment