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.

13Papers
10Years
16Questions
1Topics

Translation and Runtime Environments question pattern

Every graph below is calculated only from this selection.

Questions by year

Compare question counts across years.

Difficulty distribution

How the classified questions are distributed by difficulty.

Medium 12 75%
Easy 4 25%

Question type distribution

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

MCQ 12 75%
Numerical Answer Type (NAT) 3 18.8%
MSQ 1 6.3%

Subject weightage

Top subjects by unique question coverage.

Computer Science & Information Technology
16 Qs

Most asked topics

Top topics across the included previous year papers.

Compiler Design
16 Qs

Subtopic coverage

Top subtopics inside this exact selection.

Translation and Runtime Environments
16 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
Computer Science & Information Technology (CS) 2010
2 Qs
Computer Science & Information Technology (CS) 2008
1 Qs

Included previous year papers

Newest papers appear first. Search these papers or sort by year and name.

Paper nameYearPDFAttempt
Computer Science & Information Technology (CS) 2024 [Session 2]2024
1 questions in this view
2024
Computer Science & Information Technology (CS) 2023 [Session 2]2023
2 questions in this view
2023
Computer Science & Information Technology (CS) 2022 [Session 2]2022
1 questions in this view
2022
Computer Science & Information Technology (CS) 2021 [Session 1]2021
2 questions in this view
2021
Computer Science & Information Technology (CS) 2021 [Session 2]2021
1 questions in this view
2021
Computer Science & Information Technology (CS) 2020 [Session 2]2020
1 questions in this view
2020
Computer Science & Information Technology (CS) 2019 [Session 2]2019
1 questions in this view
2019
Computer Science & Information Technology (CS) 2016 [Session 1]2016
1 questions in this view
2016
Computer Science & Information Technology (CS) 2016 [Session 2]2016
1 questions in this view
2016
Computer Science & Information Technology (CS) 2014 [Session 2]2014
1 questions in this view
2014
Computer Science & Information Technology (CS) 2014 [Session 3]2014
1 questions in this view
2014
Computer Science & Information Technology (CS) 20102010
2 questions in this view
2010
Computer Science & Information Technology (CS) 20082008
1 questions in this view
2008

All Translation and Runtime Environments previous year questions

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

1
2008 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2008
Which of the following are true?
I. A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursion can be implemented with static storage allocation
II. Multi-level access link (or display) arrangement is needed to arrange activation records only if the programming language being implemented has nesting of procedures/functions
III. Recursion in programming languages cannot be implemented with dynamic storage allocation
IV. Nesting of procedures/functions and recursion require a dynamic heap allocation scheme and cannot be implemented with a stack-based allocation scheme for activation records
V. Programming languages which permit a function to return a function as its result cannot be implemented with a stack-based storage allocation scheme for activation records
Open complete paper
2
2010 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2010

Which data structure in a compiler is used for managing information about variables and their attributes?

Open complete paper
3
2010 · Computer Science & Information Technology · Compiler Design · Translation and Runtime Environments
Computer Science & Information Technology (CS) 2010

Which languages necessarily need heap allocation in the runtime environment?

Open complete paper
4
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
5
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
6
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
7
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
8
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
9
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
10
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
11
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
12
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
13
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
14
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
15
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
16
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