PREVIOUS YEAR SOLVED PAPERS - December 2015 Paper 3

Avatto > > UGC NET COMPUTER SCIENCE > > PREVIOUS YEAR SOLVED PAPERS > > December 2015 Paper 3

26. The context free grammar given by S → XYX X → aX|bX|λ Y → bbb generates the language which is defined by regular expression:

  • Option : C
  • Explanation :
    S → XYX X → aX|bX|λ i.e. (a + b)* Y → bbb S → (a + b)*(bbb)(a + b)* So, option (C) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


27. There are exactly __________ different finite automata with three states x, y and z over the alphabet {a, b} where x is always the start state.

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


28. Given the following two languages: L1 = {anban|n > 0} L2 = {an b an bn + 1|n > 0} Which of the following is correct ?

  • Option : A
  • Explanation : 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.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


29. Which of the following is used to make an Abstract class?

  • Option : A
  • Explanation :
    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.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


30. Match the following with reference to object-oriented modeling.

List IList 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)

  • Option : B
  • Explanation :
  • Using similar operations to do similar things is Polymorphism
  • Create new classes from existing class is Inheritence.
  • Picking both operator and attributes with operations appropriate to model an object is encapsulation
  • Hiding implementation details of methods from users of objects is Abstraction
  • So, option (B) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


Related Quiz.
December 2015 Paper 3