Professional Documents
Culture Documents
questions-based paper of Final Term Examination Spring 2021. I take full responsibility of
cheating/copying/plagiarizing, then Institute reserves the right to reject my paper and take
Student Signature
Final Term Exam / Spring 2021 (Paper Duration 24 hours)
(Online Assignment Based Question Paper)
Marks
Q.No. 1 2 3 4 5 6 7 8 9 10 Obtained/
Total Marks
Marks
Obtaine
d
Total Marks in Words:
To be filled by Student
(Theoretical Examination)
Overload == operator to compare the values of 2 objects. The overloaded function return 1 if
all values of both objects are same and return 0 if not same.
Answer
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Q. No. 2. Write a class LocalPhone that contains an attribute phone to store local phone number.
The class contains member functions to input and display phone number. Write a child class
NatPhone for national phone number that inherits LocPhone class. It additionally contains an
attribute to store city code. It also contains member functions to input and display the city code.
Write another class intPhone for international phone number that inherits NatPhone Class. It
additionally contains an attribute to store country code. It also contains member functions to input
and show the country code. (Marks 8)
Answer
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Q. No. 3. Write a class template that inputs the index of the array and displays the value in the
specified index. (Marks 8)
Answer
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Answer
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________