My Cart
Your Cart 0

    Your cart is empty.

  • Total (Amount) ₹0.00
Previous year question hub

Translation and Runtime Environments - Compiler Design - Computer Science & Information Technology Previous Year Questions

Practice Translation and Runtime Environments - Compiler Design - Computer Science & Information Technology previous year questions organised from real papers, with year-wise coverage and clear topic navigation.

11Papers
8Years
13Questions
1Topics

Translation and Runtime Environments question pattern

Every graph below is calculated only from this selection.

Questions by year

Year-wise coverage for Translation and Runtime Environments. Each bar uses a separate theme-derived color.

Difficulty distribution

How the classified questions are distributed by difficulty.

Medium 10 76.9%
Easy 3 23.1%

Question type distribution

MCQ, numerical, multiple-select and other formats found in these papers.

MCQ 9 69.2%
Numerical Answer Type (NAT) 3 23.1%
MSQ 1 7.7%

Subject weightage

Top subjects by unique question coverage.

Computer Science & Information Technology
13 Qs

Most asked topics

Top topics across the included previous year papers.

Compiler Design
13 Qs

Subtopic coverage

Top subtopics inside this exact selection.

Translation and Runtime Environments
13 Qs

Paper coverage

Question coverage for the most populated papers. Every active PYP paper remains listed below.

Computer Science & Information Technology (CS) 2024 [Session 2]
1 Qs
Computer Science & Information Technology (CS) 2023 [Session 2]
2 Qs
Computer Science & Information Technology (CS) 2022 [Session 2]
1 Qs
Computer Science & Information Technology (CS) 2021 [Session 1]
2 Qs
Computer Science & Information Technology (CS) 2021 [Session 2]
1 Qs
Computer Science & Information Technology (CS) 2020 [Session 2]
1 Qs
Computer Science & Information Technology (CS) 2019 [Session 2]
1 Qs
Computer Science & Information Technology (CS) 2016 [Session 1]
1 Qs
Computer Science & Information Technology (CS) 2016 [Session 2]
1 Qs
Computer Science & Information Technology (CS) 2014 [Session 2]
1 Qs
Computer Science & Information Technology (CS) 2014 [Session 3]
1 Qs

Included previous year papers

Newest papers appear first. Sort by year, question coverage or name.

PaperYear / sessionQuestions in this viewOpen
Computer Science & Information Technology (CS) 2024 [Session 2]20241View paper
Computer Science & Information Technology (CS) 2023 [Session 2]20232View paper
Computer Science & Information Technology (CS) 2022 [Session 2]20221View paper
Computer Science & Information Technology (CS) 2021 [Session 1]20212View paper
Computer Science & Information Technology (CS) 2021 [Session 2]20211View paper
Computer Science & Information Technology (CS) 2020 [Session 2]20201View paper
Computer Science & Information Technology (CS) 2019 [Session 2]20191View paper
Computer Science & Information Technology (CS) 2016 [Session 1]20161View paper
Computer Science & Information Technology (CS) 2016 [Session 2]20161View paper
Computer Science & Information Technology (CS) 2014 [Session 2]20141View paper
Computer Science & Information Technology (CS) 2014 [Session 3]20141View paper

All Translation and Runtime Environments previous year questions

Practice every matching question in batches of 20, with every available option.

1
2014 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2014 [Session 2]
Which one of the following is NOT performed during compilation?
Open complete paper
2
2014 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2014 [Session 3]
Which of the following statements are CORRECT?
1) Static allocation of all data areas by a compiler makes it impossible to implement recursion.
2) Automatic garbage collection is essential to implement recursion.
3) Dynamic allocation of activation records is essential to implement recursion.
4) Both heap and stack are essential to implement recursion.
Open complete paper
3
2016 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2016 [Session 1]
Consider the following Syntax Directed Translation Scheme (SDTS), with non-terminals {S, A} and terminals {a, b}.
S → aA { print 1 } S → a { print 2 } A → Sb { print 3 }Using the above SDTS, the output printed by a bottom-up parser, for the input aab is:
Open complete paper
4
2016 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2016 [Session 2]
Consider the following Syntax Directed Translation Scheme (SDTS), with non-terminals {S, A} and terminals {a, b}.
\(S \to aA\)    { print 1 }
\(S \to a\)       { print 2 }
\(A \to Sb\)    { print 3 }
Using the above SDTS, the output printed by a bottom-up parser, for the input aab is:
Open complete paper
5
2019 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2019 [Session 2]
Consider the following grammar and the semantic actions to support the inherited type declaration attributes. Let X1, X2, X3, X4, X5, and X6 be the placeholders for the non-terminals D, T, L or L1 in the following table:
Production ruleSemantic action
D → T LX1.type = X2.type
T → intT.type = int
T → floatT.type = float
L → L1 , idX3.type = X4.type
addType(id.entry, X5.type)
L → idaddType(id.entry, X6.type)
Which one of the following are the appropriate choices for X1, X2, X3 and X4?
Open complete paper
6
2020 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2020 [Session 2]
Consider the following statements.
I. Symbol table is accessed only during lexical analysis and syntax analysis.
II. Compilers for programming languages that support recursion necessarily need heap storage for memory allocation in the run-time environment.
III. Errors violating the condition ‘any variable must be declared before its use’ are detected during syntax analysis.
Which of the above statements is/are TRUE?
Open complete paper
7
2021 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2021 [Session 1]

Consider the following grammar (that admits a series of declarations, followed by expressions) and the associated syntax directed translation (SDT) actions, given as pseudo-code:

P → D* E*

D → int ID {record that ID.lexeme is of type int}

D → bool ID {record that ID.lexeme is of type bool}

E → E1 + E2 {check that E1.type = E2.type = int; set E.type := int}

E → !E1 {check that E1.type = bool; set E.type := bool}

E → ID {set E.type := int}

With respect to the above grammar, which one of the following choices is correct?

Open complete paper
8
2021 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2021 [Session 1]
Consider the following statements.

\( S_1 \) : The sequence of procedure calls corresponds to a preorder traversal of the activation tree.
\( S_2 \) : The sequence of procedure returns corresponds to a postorder traversal of the activation tree.

Which one of the following options is correct?
Open complete paper
9
2021 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2021 [Session 2]
In the context of compilers, which of the following is/are NOT an intermediate representation of the source program?
Open complete paper
10
2022 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2022 [Session 2]
Consider the following grammar along with translation rules.
\(S \to S_1 \# T\)      \(\{S_{val} = S_{1_{val}} * T_{val}\}\)
\(S \to T\)      \(\{S_{val} = T_{val}\}\)
\(T \to T_1 \% R\)      \(\{T_{val} = T_{1_{val}} \div R_{val}\}\)
\(T \to R\)      \(\{T_{val} = R_{val}\}\)
\(R \to id\)      \(\{R_{val} = id_{val}\}\)
Here # and % are operators and \(id\) is a token that represents an integer and \(id_{val}\) represents the corresponding integer value. The set of non-terminals is \(\{S, T, R, P\}\) and a subscripted non-terminal indicates an instance of the non-terminal.
Using this translation scheme, the computed value of \(S_{val}\) for root of the parse tree for the expression \(20\#10\%5\#8\%2\%2\) is ______________.
Open complete paper
11
2023 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2023 [Session 2]
Consider the following program:
int main() { f1(); f2(2); f3(); return(0); } int f1() { return(1); } int f2(int X) { f3(); if (X==1) return f1(); else return (X*f2(X-1)); } int f3() { return(5); }
Which one of the following options represents the activation tree corresponding to the main function?
Open complete paper
12
2023 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2023 [Session 2]
Consider the syntax directed translation given by the following grammar and semantic rules. Here \(N, I, F\) and \(B\) are non-terminals. \(N\) is the starting non-terminal, and #, \(\mathbf{0}\) and \(\mathbf{1}\) are lexical tokens corresponding to input letters "#", "0" and "1", respectively. \(X.val\) denotes the synthesized attribute (a numeric value) associated with a non-terminal \(X\). \(I_1\) and \(F_1\) denote occurrences of \(I\) and \(F\) on the right hand side of a production, respectively. For the tokens \(\mathbf{0}\) and \(\mathbf{1}\), \(\mathbf{0}.val = 0\) and \(\mathbf{1}.val = 1\).
\[\begin{align*} N &\to I \# F & N.val = I.val + F.val \\ I &\to I_1 B & I.val = (2 \cdot I_1.val) + B.val \\ I &\to B & I.val = B.val \\ F &\to B F_1 & F.val = \frac{1}{2} (B.val + F_1.val) \\ F &\to B & F.val = \frac{1}{2} B.val \\ B &\to \mathbf{0} & B.val = \mathbf{0}.val \\ B &\to \mathbf{1} & B.val = \mathbf{1}.val \end{align*}\]
The value computed by the translation scheme for the input string
\[10\#011\]
is ______. (Rounded off to three decimal places)
Open complete paper
13
2024 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2024 [Session 2]

Which of the following statements is/are FALSE?

Open complete paper