Timing : 9am 08-12-2012
MCQ are mostly from past papers. 20 marks
- List of two operators that can’t be overloaded? (2 marks)
- Consider the following cal of an overloaded “+” operator. (2 marks)
Identify which object will be passed as an argument to the overloaded function. Justify your answer with at least 1 solid reason?
- Consider the following scenario: (3 marks)
A class X does not have any overloaded operator and has a member function “Subtract” to subtract two objects of X, and then placing the result in third object.
Where third is a calling object.
- Consider the following diagram. (5 marks)
What type of relationship exist
Implemented data members and member function in C++ with appropriate data types.
Implement the relationship between classes in C++.
- Ik function ta string ka (3 marks)
- Ik istara ka question ta k Relationships define karna ta in which women is a derived class and lady doctor is a base class. List banana the. (5 marks)
20 objectives n 6 subjective…….
1.this pointer are not accessible for ___________.
2.A generalization-specialization relation between classes are implemented using
3.A class can be identified from a statement by __________.
4.the member of the class that can be accessed and work as interface _______.
5.A class can be identified from a statement by ————-
►Noun (Page 58)
6.Which one is not keyword in C++?
► B_op ► const ► None of given
when static member of the class are initialized?justify your answer.(2)
write two different ways to overload the post increment operator?(2)
how can we overload stream extraction and insertion operator?(3)
1 class was given don’t remember ,question was where the +,-,* are overloaded and these are from left to right.(3)
what are accessor function ? explain with example(5)
write c++ code to overload subscript operator for string class.(5)
DOWNLOAD SOLUTION HERE