Click to Get updated NTA UGC NET CS Test Series           Study Material for UGC NET Computer Science- 2019

Object Oriented Programming - Object Modelling

26:  

Specifically, overloading involves

A.

one function with a variety of arguments

B.

multiple functions defined with the same name

C.

one function with multiple names

D.

multiple functions with different names.

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



27:  
A usable function header for an overloaded » operator for a Number class is
A.
Number operator » (istream & in, Number &num)
B.
istream & operator » (istream & in, const Number & num)
C.
friend istream & operator» (istream & in, Number & num)
D.
istream & operator » (istream & in, Number &num)
 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



28:  
If » operator is overloaded properly for use for input with a number class, and a and bare member of the Number class, which of the following statementis allowed?
A.

cin >>a

B.

cin >> a,b

C.

Both (a) and (b)

D.

None of these

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



29:  

Assume num = 8; the value of expression num++ is

A.

7

B.

8

C.

9

D.

Impossible to tell

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



30:  
If ++ operator is overloaded properly, then operator ++ () function returns 
A.

a copy of an incremented member of a class

B.

a copy of an incremented data item

C.

a reference to a class member data item

D.

this pointer

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:






X