Previous Year Questions: Matching | Compiler Design - Computer Science Engineering (CSE) PDF Download

Q1:  Consider the following two sets:  (2024 SET 2)
Set X   Set Y
P. Lexical Analyzer  1. Abstract Syntax Tree
Q. Syntax Analyzer  2. Token
R. Intermediate Code Generator   3. Parse Tree
S. Code Optimizer  4. Constant Folding
Which one of the following options is the CORRECT match from Set X to Set Y ?
(a ) P-4; Q-1; R-3; S-2
(b) P-2; Q-3; R-1; S-4
(c) P-2; Q-1; R-3; S-4
(d) P-4; Q-3; R-2; S-1
Ans: 
(b)
Sol: 

  • Lexical analysis → tokens
  • Syntax analysis → parse tree
  • ICG → abstract syntax tree
  • code optimization →constant folding (it is one of the code optimization methods)

Option (B) is correct

Q2: Match the following according to input (from the left column) to the complier phase (in the right column) that processes it.  (2017 SET 2) 

Previous Year Questions: Matching | Compiler Design - Computer Science Engineering (CSE)

(a) P-(ii),Q-(iii), R-(iv), S-(i)
(b) P-(ii),Q-(i), R-(iii), S-(iv)
(c) P-(iii),Q-(iv), R-(i), S-(ii)
(d) P-(i),Q-(iv), R-(ii), S-(iii)
Ans: (c)
Sol:  Correct Option: C

  • Q - iv because Character stream is given as input to lexical analyzer
  • P - iii Syntax tree is given as input to semantic analyzer
  • R - i Intermediate code given as input to code generator
  • S - ii  Token stream  given as input to syntax analyzer

Q3: Match the following:  (2015 SET 2)
P. Lexical analysis  1. Graph coloring
Q. Parsing  2. DFA minimization
R. Register allocation  3. Post-order traversal
S. Expression evaluation  4. Production tree
Ans: 
(c)
Sol:
1. Regular expression uses FA & Regular Sets.
2. Expression can be evaluated with postfix Traversals.
3. Register allocation can be modeled by graph coloring.
4. The parser constructs a production tree.


Q4: Match all items in Group 1 with correct options from those given in Group 2.  (2009)
Previous Year Questions: Matching | Compiler Design - Computer Science Engineering (CSE)

(a)P-4. Q-1, R-2, S-3
(b) P-3, Q-1, R-4, S-2
(c) P-3, Q-4, R-1, S-2
(d) P-2, Q-1, R-4, S-3
Ans: (b)
Sol: Regular expressions are used in lexical analysis.
Pushdown automata is related to context free grammar which is related to syntax analysis.
Dataflow analysis is done in code optimization.
Register allocation is done in code generation.
Correct Option: B

The document Previous Year Questions: Matching | Compiler Design - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Compiler Design.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
26 videos|66 docs|30 tests

Top Courses for Computer Science Engineering (CSE)

FAQs on Previous Year Questions: Matching - Compiler Design - Computer Science Engineering (CSE)

1. What are some popular programming languages used in Computer Science Engineering (CSE)?
Ans. Some popular programming languages used in CSE include Java, Python, C++, JavaScript, and SQL.
2. How important is data structures and algorithms in Computer Science Engineering (CSE)?
Ans. Data structures and algorithms are crucial in CSE as they form the foundation for solving complex problems efficiently in programming and software development.
3. What career opportunities are available for Computer Science Engineering (CSE) graduates?
Ans. CSE graduates can pursue careers in software development, data analysis, cybersecurity, artificial intelligence, network engineering, and more.
4. How can I improve my coding skills as a Computer Science Engineering (CSE) student?
Ans. To improve coding skills, practice regularly, work on coding projects, participate in coding competitions, and seek feedback from peers and mentors.
5. What are some key topics covered in a typical Computer Science Engineering (CSE) curriculum?
Ans. A typical CSE curriculum covers topics such as programming languages, data structures, algorithms, computer networks, operating systems, databases, and software engineering.
26 videos|66 docs|30 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Previous Year Questions with Solutions

,

Previous Year Questions: Matching | Compiler Design - Computer Science Engineering (CSE)

,

pdf

,

Important questions

,

Free

,

past year papers

,

study material

,

Objective type Questions

,

Semester Notes

,

Previous Year Questions: Matching | Compiler Design - Computer Science Engineering (CSE)

,

practice quizzes

,

mock tests for examination

,

Summary

,

Extra Questions

,

Exam

,

Sample Paper

,

Viva Questions

,

ppt

,

shortcuts and tricks

,

MCQs

,

video lectures

,

Previous Year Questions: Matching | Compiler Design - Computer Science Engineering (CSE)

;