}
~FICTION ( ) //Member Function 5
}
};
void┬а ┬а main()┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а//Line 1
{┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а //Line 2
FICTION FI, F2(101,"Dare",75);┬а ┬а ┬а // Line 3
for┬а ┬а (int 1=0;I<4;I++)┬а ┬а ┬а ┬а ┬а ┬а //Line┬а 4
{┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а//Line┬а 5
F1.Increase(2 0);F2.
Increase(15);┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а//Line 6┬а ┬а
FI.Show();┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а //Line 7
F2.Show()┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а//Line 8
}┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а ┬а//Line 9
(i) Which specific concept of object oriented programming out of the following is illustrated by Member Function 1 and Member Function 2 combined together ?
> Data Encapsulation
> Data Hiding
> Polymorphism
> Inheritance
(ii) How many times the message тАЬFiction removed!тАЭ will be display ed after executing the above C + + code ? Out of Line 1 to Line 9, which line is responsible to display the message тАЬFiction removed! тАЭ ?
Answer -
(i) Polymorphism┬а ┬а 1
(ii) 2 times┬а ┬а 1
Line 9.┬а ┬а 1