Friday 16 February 2018

CS201 Final Term Solved Past Papers By Moaz With Refrence


CS201 Final Term Solved Past Papers By Moaz


Question No: 1 ( Marks: 1 ) - Please choose one
All A template function must have at least ---------- generic data type
Zero
One (Page 499)
Two
Three
Question No: 2 ( Marks: 1 ) – Please choose one
Which of the following statement is best regarding declaration of friend function?
Friend function must be declared after public keyword
. Friend function must be declared after private keyword.
Friend function must be declared at the top within class definition.
It can be declared anywhere in class as these are not affected by the public and private keywords. (Page
346)
Question No: 3 ( Marks: 1 ) - Please choose one
Which one of the following is the declaration of overloaded pre-increment operator implemented as
member function?
Class-name operator +() ;
Class-name operator +(int) ;
Class-name operator ++() ; (Page 389)
Class-name operator ++(int) ;
Question No: 4 ( Marks: 1 ) - Please choose one
Class is a user defined___________.
data type (Page 317)
memory referee
value
none of the given options.
Question No: 5 ( Marks: 1 ) - Please choose one
How many bytes will the pointer intPtr of type int move in the following statement? intPtr += 3 ;
3 bytes
6 bytes
12 bytes
24 bytes
Question No: 6 ( Marks: 1 ) - Please choose one
Which of the following is the correct C++ syntax to allocate space dynamically for an array of 10 int?
new int(10) ;
new int[10] ;
int new(10) ;
int new[10];
Question No: 7 ( Marks: 1 ) - Please choose one
A Pointer is a special variable that contain
Data values
Memory Address (Page 267)
Both data and values
None of the given option
Question No: 8 ( Marks: 1 ) - Please choose one
Reference Value Type Data The code is written to __________ the program.
implement
design
analysis
none of the given options
Question No: 9 ( Marks: 1 ) - Please choose one
Which of the following function is used to increase the size of already allocated memory chunk?
malloc
calloc
realloc (Page 285)
free
Question No: 10 ( Marks: 1 ) - Please choose one
Which of the following is NOT a preprocessor directive?
#error
#define
#line
#ndefine (Page 272)
Question No: 11 ( Marks: 1 ) – Please choose one
The stream objects cin and cout are included in which header file?
iostream.h (Page 15)
fstream.h
istream.h
ostream.h
Question No: 12 ( Marks: 1 ) – Please choose one
Overloaded delete operator function takes the same parameter as an argument returned by new operator
function.
True (Page 414)
False
Question No: 13 ( Marks: 1 ) – Please choose one
When an array of object is created dynamically then there is no way to provide parameterized constructors
for array of objects.
True (Page 414)
False
Question No: 14 ( Marks: 1 ) - Please choose one
Computer can understand only machine language code.
True
False
Question No: 15 ( Marks: 1 ) - Please choose one
We can not define a function as a friend of a Template class.
True
False (Page 151)
Class templates can have friends. A class or class template, function, or function template can be a friend to
a template class. Friends can also be specializations of a class template or function template, but not partial
specializations.
Question No: 16 ( Marks: 1 ) – Please choose one
What will be the value of ‘a’ and ‘b’ after executing the following statements?
A = 3;
b = a++;
3, 4
4, 4
3, 3
4, 3
Question No: 17 ( Marks: 1 ) – Please choose one
_______ is used to trace the logic of the program and correct the logical errors.
Compiler
Editor
Linker
Debugger (Page 13)
Question No: 18 ( Marks: 1 ) - Please choose one
new and delete are _____ whereas malloc and free are _____.
Functions, operators
Classes, operators
Operators, functions (Page 342-285)
Operators, classes
Question No: 19 ( Marks: 1 ) - Please choose one
Like member functions, ______ can also access the private data members of a class.
Non-member functions
Friend functions (Page 346)
Any function outside class
None of the given options
Question No: 20 ( Marks: 1 ) – Please choose one
Which situation would require the use of a non-member overloaded operator?
The overloaded operator is an Assignment operator.
The left most operand is an object of a class.(Page 375)
The left operand is built-in data type.
The operator returns a reference.

Clink On Link Given Below For Download Complete File Of CS201 MCQS


No comments:

Post a Comment