UGC NET COMPUTER SCIENCE SOLVED PAPERS 2014-16 - UGC NET Computer Science Paper 2 JULY 2016

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

  • Option : D
  • Explanation :
    Regular expression (0|∈)1+2* (3|∈) 0122, 0123, 1123, 0112, 0113, 1113, 0111, 1222, 1123, 1111, 1223, 1112; Total 12 strings of lenghth 4 are possible. So, option (D) is correct.
Cancel reply
Cancel reply

33. In _______, the bodies of the two loops are merged together to form a single loop provided that they do not make any references to each other.

  • Option : D
  • Explanation :
  • In loop jamming, the bodies of the two loops are merged together to form a single loop provided that they do not make any references to each other.
  • In loop concatenation, the bodies of the two loops are concatenated together to form a series of loop, loop concatenation, some times help to reduce complexity.
  • In loop unrolling, we try to optimize a program's execution speed. It is also known as space–time tradeoff.
  • In strength reduction compiler optimize expensive operations with equivalent but less expensive operations.
  • So, option (D) is correct.
Cancel reply
Cancel reply

34. Which of the following is not typically a benefit of dynamic linking?
I. Reduction in overall program execution time.
II. Reduction in overall space consumption in memory.
III. Reduction in overall space consumption on disk.
IV. Reduction in the cost of software updates.

  • Option : B
  • Explanation :
    Dynamic linking is used to reduce space consumption on disk and memory. It also reduce the cost of software update. But it doesn't reduce program's time complexity. So, option (B) is correct.
Cancel reply
Cancel reply

35. Which of the following is FALSE?

  • Option : B
  • Explanation :
  • The grammar S → a Sb |bSa|SS|∈, where S is the only non-terminal symbol and ∈ is the null string, is ambiguous. When we will try to generate an expression then one string can be generated by more then one parse tree.
  • LALR is more powerful then SLR.
  • An LL(1) parser is a top-down parser.
  • YACC tool is an LALR(1) parser generator.
  • So, option (B) is correct.
Cancel reply
Cancel reply