Selected Subject is: CS201

Mid Term Final Term


These MCQs are include all Question midterm and final term

Question:(1) All A template function must have at least ---------- generic data type
a) Zero
b) One(Answer)
c) Two
d) Three
Question:(2) Which of the following statement is best regarding declaration of friend function?
a) Friend function must be declared after public keyword
b) Friend function must be declared after private keyword
c) Friend function must be declared at the top within class definition
d) It can be declared anywhere in class as these are not affected by the public and private keywords(Answer)
Question:(3) Which one of the following is the declaration of overloaded pre-increment operator implemented as member function?
a) Class-name operator +() ;
b) Class-name operator +(int) ;
c) Class-name operator ++() ;(Answer)
d) Class-name operator ++(int)
Question:(4) Class is a user defined___________.
a) data type (Answer)
b) memory referee
c) value
d) none of the given options
Question:(5) How many bytes will the pointer intPtr of type int move in the following statement? intPtr += 3 ;
a) 3 bytes
b) 6 bytes
c) 12 bytes(Answer)
d) 24 bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17