Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Tests  >  Test: Syntax Directed Translation- 1 - Computer Science Engineering (CSE) MCQ

Test: Syntax Directed Translation- 1 - Computer Science Engineering (CSE) MCQ


Test Description

8 Questions MCQ Test - Test: Syntax Directed Translation- 1

Test: Syntax Directed Translation- 1 for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Test: Syntax Directed Translation- 1 questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: Syntax Directed Translation- 1 MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Syntax Directed Translation- 1 below.
Solutions of Test: Syntax Directed Translation- 1 questions in English are available as part of our course for Computer Science Engineering (CSE) & Test: Syntax Directed Translation- 1 solutions in Hindi for Computer Science Engineering (CSE) course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: Syntax Directed Translation- 1 | 8 questions in 30 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
Test: Syntax Directed Translation- 1 - Question 1

The term “environment” in programming language semantics is said as

Test: Syntax Directed Translation- 1 - Question 2

The linker

Detailed Solution for Test: Syntax Directed Translation- 1 - Question 2

A linker or link editor is a computer program that takes one or more object files generated by a compiler and combines then into single executable file, library file or another object file.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Syntax Directed Translation- 1 - Question 3

Generation of intermediate code based on an abstract machine model is useful in compilers because

Detailed Solution for Test: Syntax Directed Translation- 1 - Question 3

Generation of intermediate code based on an abstract machine model is useful in compilers because it makes implementation of lexical analysis and syntax analysis easier

Test: Syntax Directed Translation- 1 - Question 4

 In the following grammar:

Which of the following is true?

Detailed Solution for Test: Syntax Directed Translation- 1 - Question 4

Creating syntax tree for

Therefore  is left associative.

Creating syntax tree for 

Therefore,  is right associative.

Test: Syntax Directed Translation- 1 - Question 5

In a bottom-up evaluation of a syntax directed definition, inherited attributes can

Detailed Solution for Test: Syntax Directed Translation- 1 - Question 5

Every S(Synthesized) - attributed definition is L- attributed. For implementing inherited attributed during bottom-up parsing, extends to some, but not LR grammars. Consider the following example

In the example above the nonterminal L in L → E inherits the count of the number of 1 ’s generated by S. Since the production L → E is the first that a bottom- up parser would reduce by, the translator at the time can't know the number of 1 ’s in the input. So in a bottom-up evaluation of a syntax directed definition, inherits attributes can’t be evaluated if the definition is L-attributed in the given example. So we can say. that L-attributed definition is based on simple LR(1) grammar, but it can’t be implemented always but inherit attributes can be evaluated only if the definition has synthesized attributes.

Test: Syntax Directed Translation- 1 - Question 6

Consider the translation scheme shown below:

Here num is a token that represents an integer and num.val represents the corresponding integer value. For an input string ‘9 + 5 + 2’, this translation scheme will print

Detailed Solution for Test: Syntax Directed Translation- 1 - Question 6

For the input ‘9 + 5 + 2’ the translation scheme is 95 + 2 + shown below:

Test: Syntax Directed Translation- 1 - Question 7

Consider the grammar rule E → E1 - E2 for arithmetic expressions. The code generated is targeted to a CPU having a single user register. The subtraction operation requires the first operand to be in the register. If E1 and E2 do not have any common subexpression, in order to get the shortest possible code

Detailed Solution for Test: Syntax Directed Translation- 1 - Question 7

To optimize the solution evaluate the expression E2. Then we can calculate E1 and finally E1 will be one of operands that will be in register and we can perform subtraction directly. But if we follow the opposite then we have to make move and store operations.

Test: Syntax Directed Translation- 1 - Question 8

Consider the grammar For a sentence , the handles in the right-sentential form of the reduction are

Detailed Solution for Test: Syntax Directed Translation- 1 - Question 8

Information about Test: Syntax Directed Translation- 1 Page
In this test you can find the Exam questions for Test: Syntax Directed Translation- 1 solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Syntax Directed Translation- 1, EduRev gives you an ample number of Online tests for practice

Top Courses for Computer Science Engineering (CSE)

Download as PDF

Top Courses for Computer Science Engineering (CSE)