BEL PE · Computer Science

Theory of Computation & Compilers Previous Year Questions

8 Theory of Computation & Compilers (Computer Science) questions asked in BEL PE previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.

  • 8 questions
  • Official answer key
  • Free

Other Computer Science topics

Q1BEL PE Computer Science, 17 Dec 2023 (8:30 AM)
Which of the following is NOT the action performed by a shift – reduce parser?
  1. AError
  2. BDebase
  3. CAccept
  4. DShift
Show answerHide answer

Correct answer: (B) Debase

Q2BEL PE Computer Science, 17 Dec 2023 (8:30 AM)
Parser is categorized into which type of context-free grammar?
  1. ATwo
  2. BOne
  3. CThree
  4. DFour
Show answerHide answer

Correct answer: (A) Two

Q3BEL PE Computer Science, 17 Dec 2023 (8:30 AM)
Which of the following identities of regular expression is NOT correct?
  1. AΛR = R
  2. Bφ + R = R
  3. CR* R* = R*
  4. DφR = R
Show answerHide answer

Correct answer: (D) φR = R

Q4BEL PE Computer Science, 17 Dec 2023 (8:30 AM)
How many steps are required to construct a string abbbb from the grammar given by using right most derivation? S → aAB A → bBb B → A | ε
  1. A5
  2. B7
  3. C4
  4. D6
Show answerHide answer

Correct answer: (A) 5

Q5BEL PE Computer Science, 17 Dec 2023 (8:30 AM)
Which of the following is the CORRECT sequence of the phases of a compiler?
  1. ALexical analysis, intermediate code generation, syntax analysis, code generation, code optimization
  2. BLexical analysis, syntax analysis, intermediate code generation, code generation, code optimization
  3. CLexical analysis, intermediate code generation, syntax analysis, code optimization, code generation
  4. DLexical analysis, syntax analysis, intermediate code generation, code optimization, code generation
Show answerHide answer

Correct answer: (D) Lexical analysis, syntax analysis, intermediate code generation, code optimization, code generation

Q6BEL PE Computer Science, 17 Dec 2023 (8:30 AM)
Context free grammar is ______ grammar according to the Chomsky hierarchy.
  1. AType 2
  2. BType 1
  3. CType 0
  4. DType 3
Show answerHide answer

Correct answer: (A) Type 2

Q7BEL PE Computer Science, 17 Dec 2023 (8:30 AM)
Name the phase of compiler, which separates characters of the source language into groups that logically belong together, these groups are called tokens.
  1. ALexical analysis
  2. BCode optimization
  3. CError handling
  4. DSyntax analysis
Show answerHide answer

Correct answer: (A) Lexical analysis

Q8BEL PE Computer Science, 17 Dec 2023 (8:30 AM)
The given finite automata is equivalent to which of the following regular expression? States: q0 (start), q1, q4, q5, q2 and qf (final). Transitions: q0 –a→ q1; q1 –b→ qf; q0 –a→ q4; q4 –a→ q2; q0 –b→ q5; q5 –b→ q2; q2 –a,b→ q2 (self loop); q2 –b→ qf.
  1. Aab (aa + b) (a + b)* a
  2. Bab (aa + bb) (a + b)* b
  3. C(a + b)* (aa + bb) (a + b)*
  4. Dab + (aa + bb) (a + b)* b
Show answerHide answer

Correct answer: (D) ab + (aa + bb) (a + b)* b

How to use these BEL PE Computer Science questions

Every question here was asked in a real BEL PE paper; the paper and shift are shown on the card, and the number opens the question on its own page. Try each one before tapping Show answer, then attempt the full BEL PE papers as timed tests to check your speed under exam conditions.

More BEL PE subjects