PREVIOUS YEAR SOLVED PAPERS - August 2016 Paper 2

31. The number of strings of length 4 that are generated by the regular expression (0+1+|2+3+)*, where | is an alternation character and {+, *} are quantification characters, is:

  • Option : C
  • Explanation :
    Possible strings of length 4 are: 0001, 0111, 0011, 0101, 0123, 2323, 2333, 2223, 2233, 2301. Total 10 strings are possible. 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 *


32. The content of the accumulator after the execution of the following 8085 assembly language program, is

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 *


33. In compiler optimization, operator strength reduction uses mathematical identities to replace slow math operations with faster operations. Which of the following code replacements is an illustration of operator strength reduction ?

  • Option : B
  • Explanation :
    In option (B), Multiplication operation is replaced with Shift Operator . It reduce the operator strength because shift operator is less expensive than multiplication operation. 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 *


34. Which of the following are the principles tasks of the linker?
I. Resolve external references among separately compiled program units.
II. Translate assembly language to machine code.
III. Relocate code and data relative to the beginning of the program.
IV. Enforce access-control restrictions on system libraries.

  • Option : B
  • Explanation : Principles tasks of the linker are:
    1. Resolve external references among separately compiled program units.
    2. Relocate code and data relative to the beginning of the program.
    • Assembler translate assembly language to machine code.
    • Loader enforces access-control restrictions on system libraries.
    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 *


35. Which of the following is FALSE?

  • Option : B
  • Explanation :
  • The grammar S→aS|aSbS|∈, where S is the only non-terminal symbol, and ∈ is the null string, is ambiguous.Correct
  • An unambiguous grammar has same left most and right most derivation.Inorrect
  • An ambiguous grammar can never be LR(k) for any k.Correct
  • Recursive descent parser is a top-down parser.Correct
  • 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.
August 2016 Paper 2