Aspire Faculty ID #17450 · Topic: UGC NET Computer Science June 2024 (Paper II) · Just now
UGC NET Computer Science June 2024 (Paper II)

The following code:

stmt → if expr then stmt else stmt
      | if expr then stmt

suffers from:

Solution

This grammar produces the dangling-else problem.

In such cases the else can be associated with more than one if, producing more than one parse tree.


Thus the grammar is ambiguous.

Previous 10 Questions — UGC NET Computer Science June 2024 (Paper II)

Nearest first
1
Arrange the steps of Mathematical Modeling:A. Solution fitting with dataB. Formulation mathematicallyC. Solve mathemati…
Topic: UGC NET Computer Science June 2024 (Paper II)
2
The chairs of an auditorium are to be labelled with a letter followed by a positive two digits integer where labelling …
Topic: UGC NET Computer Science June 2024 (Paper II)
3
How much time does an algorithm using $2^{50}$ bit operations need if each bit operation takes $2^{-38}$ second?
Topic: UGC NET Computer Science June 2024 (Paper II)
4
Match List-I with List-II. List-I List-II A. Thread spawn I. to convert a blocking system call into…
Topic: UGC NET Computer Science June 2024 (Paper II)
5
Which of the followings are true for a complete binary tree?A. It always has odd number of vertices. B. With $n$ intern…
Topic: UGC NET Computer Science June 2024 (Paper II)
6
Which of the following is not the goal of reverse engineering?
Topic: UGC NET Computer Science June 2024 (Paper II)
7
The cyclomatic complexity of the following flow graph is:
Topic: UGC NET Computer Science June 2024 (Paper II)
8
Match List-I with List-II. List-I List-II A. RAID level-2 I. block-interleaved B. RAID level-3…
Topic: UGC NET Computer Science June 2024 (Paper II)
9
The sequence of fields in an IP datagram will be:A. flagsB. optionsC. protocolD. identificationE. service typeChoose th…
Topic: UGC NET Computer Science June 2024 (Paper II)
10
Match List-I with List-II. List-I List-II A. Complement I. Adder B. Ex-OR II. Instruction…
Topic: UGC NET Computer Science June 2024 (Paper II)

Next 10 Questions — UGC NET Computer Science June 2024 (Paper II)

Ascending by ID
Ask Your Question or Put Your Review.

loading...