S → XYX X → aX|bX|λ i.e. (a + b)* Y → bbb S → (a + b)*(bbb)(a + b)* So, option (C) is correct.
PREVIOUS YEAR SOLVED PAPERS MCQ - December 2015 Paper 3
Language L1 is context free language as L1 = {anban|n > 0}, we can compare number of a’s before b and number of a’s after b both are equal using only one stack using push and pop function but we can not compare language L2. L2 = {an b an bn + 1|n > 0} using only one stack here we can compare all number of a’s before b and number of a’s after b both are equal using only one stack using push and pop function but we cannot compare all bn + 1 at that time. Hence, L1 is context free language and L2 is not context free language.
Making atleast one member function as pure virtual function is the method to make abstract class. For more information on Abstract Class Refer:Pure Virtual Functions and Abstract Classes in C++ Option (A) is correct.
30
Match the following with reference to object-oriented modeling.
| List I | List II |
| (a) Polymorphism | (i) Picking both operator and attributes with operations appropriate to model an object |
| (b) Inheritance | (ii) Hiding implementation details of methods from users of objects |
| (c) Encapsulation | (iii) Using similar operations to do similar things |
| (d) Abstraction | (iv) Create new classes from the existing class |
Codes:
| (a) | (b) | (c) | (d) | |
| (1) | (iv) | (iii) | (i) | (ii) |
| (2) | (iii) | (iv) | (i) | (ii) |
| (3) | (iii) | (i) | (ii) | (iv) |
| (4) | (iv) | (iii) | (ii) | (i) |

