Compiler Design MCQ (Multiple Choice Questions)
Here are 1000 MCQs on Compiler Design (Chapterwise) .

Chapterwise Multiple Choice Questions on Compiler Design

- Compiler Introduction
- Finite Automata and Regular Expression
- Contextfree Grammar and Syntax Analysis
- Topdown Parsing
- Bottom Up Parsing
- Syntax Directed Definition and Translations
- Symbol Table
- Storage Management
- Error Handling
- Code Optimisation
- Code Generation
1. MCQ on Compiler Introduction
The section contains Compiler Design multiple choice questions and answers on finite automata and regular expressions, cross compilers, lexical analysis and relations.
2. Compiler Design MCQ on Finite Automata and Regular Expression
The section contains Compiler Design questions and answers on lexical analyser, finite automata, nfa with epsilon as well as minimization of dfa, regular expressions and transformation from nfa to dfa.
3. Compiler Design Multiple Choice Questions on Contextfree Grammar and Syntax Analysis
The section contains Compiler Design MCQs on syntax analyser, context free grammar, regular grammar as well as right left grammar.
4. Compiler Design MCQ on Topdown Parsing
The section contains Compiler Design multiple choice questions and answers on top-down parsing with its predictives.
5. Compiler Design Multiple Choice Questions on Bottom Up Parsing
The section contains Compiler Design questions and answers on bottom-up parsing, right sentinel grammar, l-r parser and parsing table data structures.
6. Compiler Design MCQ on Syntax Directed Definition and Translations
The section contains Compiler Design MCQs on syntax directed definitions and translations, intermediate code generation, three address, implementation of increment and decrement, array reference and switch cases.
7. Compiler Design Multiple Choice Questions on Symbol Table
The section contains Compiler Design multiple choice questions and answers on symbol table management as well as symbol table organization and run time storage.
8. Compiler Design MCQ on Storage Management
The section contains Compiler Design questions and answers on storage, stack and static allocations.
9. Compiler Design Multiple Choice Questions on Error Handling
The section contains Compiler Design MCQs on error handling, lexical phase errors, automatic error recovery with yacc and also l-r phase, predictive parsing error recovery.
10. Compiler Design MCQ on Code Optimisation
The section contains Compiler Design multiple choice questions and answers on code optimization, elimination of induction variables, eliminating global common subexpressions, loop optimization, unrolling and jamming.
11. Compiler Design Multiple Choice Questions on Code Generation
The section contains Compiler Design questions and answers on code generation, machine model, using dag as code generation and peephole optimization.
- JavaScript MCQ PDF Download
- C Programming MCQ PDF Download
- Object Oriented Programming MCQ PDF Download
- Python MCQ PDF Download
- Visual Basic MCQ PDF Download
- Software Architecture and Design MCQ Questions
- Automata Theory MCQ Questions
- C++ Programming MCQ Questions
- PHP MCQ Questions
- Ruby MCQ Questions

- Data Structures
- Year wise Solutions
- Topic wise Solutions
- Gate ECE Syllabus
- Gate CSE Practice Questions
- Algorithms Notes
- TEST SERIES

Compiler Design Exam Questions Answers
- Code Optimization
- Symbol Table
- Context free grammar
- Syntax tree and context flow graph
- External subroutines
- Micro Program
- Linker loader
- Syntax Directed Translation
- Associativity and Precedence
- Compilers and Parsers
- Pre Processor
- Phases of Compilers
- Run Time Environment
- Ambiguous and Unambiguous Grammar
- Interpreter
- Compiler Design
- Synthesized Attribute
Team AcademyEra Topic : Compiler Design Exam Questions Answers | compiler design questions and answers pdf
Leave a Reply Cancel reply
Save my name, email, and website in this browser for the next time I comment.
Compiler Design
- Lesson Plan
Assignment Questions

Explain SEmantic Analyzer and Intermediate code generator in terms of compiler design ... please answer
Compiler Design - CS8602
Important questions and answers, online study material, lecturing notes, assignment, reference, wiki.

Compiler Design
Unit i : introduction to compilers, unit ii : syntax analysis, unit iii : intermediate code generation, unit iv : run time environment and code generation, unit v : code optimization, for extra reference, compilers principles techniques and tools by alfred v aho monica s lam ravi sethi jeffrey d ullman, chapter 1 : introduction, chapter 2 : simple syntax directed translator, chapter 3 : lexical analysis, chapter 4 : syntax analysis, chapter 5 : syntax directed translation, chapter 6 : intermediate code generation, chapter 7 : run time environments, chapter 8 : code generation, chapter 9 : machine independent optimizations, chapter 10 : instruction level parallelism, chapter 11 : optimizing for parallelism and locality, chapter 12 : interprocedural analysis.
Privacy Policy , Terms and Conditions , DMCA Policy and Compliant , Contact
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.

Engineering interview questions,Mcqs,Objective Questions,Class Notes,Seminor topics,Lab Viva Pdf free download. CIVIL | Mechanical | CSE | EEE | ECE | IT | Chemical Online Quiz Tests for Freshers.
Home » COMPILER DESIGN Questions » 300+ TOP Compiler Design Interview Questions and Answer
300+ TOP Compiler Design Interview Questions and Answer
Compiler design interview questions :-.
1. What is a compiler?
A compiler is a program that reads a program written in one language –the source language and translates it into an equivalent program in another language-the target language. The compiler reports to its user the presence of errors in the source program.
2. What are the two parts of a compilation? Explain briefly.
Analysis and Synthesis are the two parts of compilation.
- The analysis part breaks up the source program into constituent pieces and creates an intermediate representation of the source program.
- The synthesis part constructs the desired target program from the intermediate representation.
3. List the subparts or phases of analysis part.
Analysis consists of three phases:
- Linear Analysis.
- Hierarchical Analysis.
- Semantic Analysis.
4. Depict diagrammatically how a language is processed.
Skeletal source program
Preprocessor
Source program
Target assembly program
Relocatable machine code
Loader/ link editor ←library, relocatable object files
Absolute machine code
5. What is linear analysis?
Linear analysis is one in which the stream of characters making up the source program is read from left to right and grouped into tokens that are sequences of characters having a collective meaning.
Also called lexical analysis or scanning .

6. List the various phases of a compiler.
The following are the various phases of a compiler:
- Lexical Analyzer
- Syntax Analyzer
- Semantic Analyzer
- Intermediate code generator
- Code optimizer
- Code generator
7. What are the classifications of a compiler?
Compilers are classified as:
- Single- pass
- Load-and-go
- Debugging or optimizing
8. What is a symbol table?
A symbol table is a data structure containing a record for each identifier, with fields for the attributes of the identifier. The data structure allows us to find the record for each identifier quickly and to store or retrieve data from that record quickly.
Whenever an identifier is detected by a lexical analyzer, it is entered into the symbol table. The attributes of an identifier cannot be determined by the lexical analyzer.
9. Mention some of the cousins of a compiler.
Cousins of the compiler are:
- Preprocessors
- Loaders and Link-Editors
10. List the phases that constitute the front end of a compiler.
The front end consists of those phases or parts of phases that depend primarily on the source language and are largely independent of the target machine. These include
- Lexical and Syntactic analysis
- The creation of symbol table
- Semantic analysis
- Generation of intermediate code
A certain amount of code optimization can be done by the front end as well. Also includes error handling that goes along with each of these phases.
11. Mention the back-end phases of a compiler.
The back end of compiler includes those portions that depend on the target machine and generally those portions do not depend on the source language, just the intermediate language. These include
- Code optimization
- Code generation, along with error handling and symbol- table operations.
12. Define compiler-compiler.
Systems to help with the compiler-writing process are often been referred to as compiler-compilers, compiler-generators or translator-writing systems.
Largely they are oriented around a particular model of languages , and they are suitable for generating compilers of languages similar model.
13. List the various compiler construction tools .
The following is a list of some compiler construction tools:
- Parser generators
- Scanner generators
- Syntax-directed translation engines
- Automatic code generators
- Data-flow engines
14. Differentiate tokens, patterns, lexeme.
- Tokens- Sequence of characters that have a collective meaning.
- Patterns- There is a set of strings in the input for which the same token is produced as output. This set of strings is described by a rule called a pattern associated with the token
- Lexeme- A sequence of characters in the source program that is matched by the pattern for a token.
15. List the operations on languages.
- Union – L U M ={s | s is in L or s is in M}
- Concatenation – LM ={st | s is in L and t is in M}
- Kleene Closure – L* (zero or more concatenations of L)
- Positive Closure – L+ ( one or more concatenations of L)
16. Write a regular expression for an identifier.
An identifier is defined as a letter followed by zero or more letters or digits.
The regular expression for an identifier is given as
letter (letter | digit)*
17. Mention the various notational shorthands for representing regular expressions.
- One or more instances (+)
- Zero or one instance (?)
- Character classes ([abc] where a,b,c are alphabet symbols denotes the regular expressions a | b | c.)
- Non regular sets
18. What is the function of a hierarchical analysis?
Hierarchical analysis is one in which the tokens are grouped hierarchically into nested collections with collective meaning.
19. What does a semantic analysis do?
Semantic analysis is one in which certain checks are performed to ensure that components of a program fit together meaningfully.
Mainly performs type checking.
20. List the various error recovery strategies for a lexical analysis.
Possible error recovery actions are:
- Panic mode recovery
- Deleting an extraneous character
- Inserting a missing character
- Replacing an incorrect character by a correct character
- Transposing two adjacent characters
21. Explain parser. Hierarchical analysis is one in which the tokens are grouped hierarchically into nested collections with collective meaning.
Also termed as Parsing .
22. Mention the basic issues in parsing. There are two important issues in parsing.
- Specification of syntax
- Representation of input after parsing.
23. Why lexical and syntax analyzers are separated out? Reasons for separating the analysis phase into lexical and syntax analyzers:
- Simpler design.
- Compiler efficiency is improved.
- Compiler portability is enhanced.
24. Define a context free grammar. A context free grammar G is a collection of the following
· V is a set of non terminals · T is a set of terminals · S is a start symbol · P is a set of production rules G can be represented as G = (V,T,S,P)
Production rules are given in the following form
Non terminal → (V U T)*
25. Briefly explain the concept of derivation. Derivation from S means generation of string w from S. For constructing derivation two things are important.
i) Choice of non terminal from several others.
ii) Choice of rule from production rules for corresponding non terminal.
Instead of choosing the arbitrary non terminal one can choose
i) either leftmost derivation – leftmost non terminal in a sentinel form
ii) or rightmost derivation – rightmost non terminal in a sentinel form
26. Define ambiguous grammar. A grammar G is said to be ambiguous if it generates more than one parse tree for some sentence of language L(G).
i.e. both leftmost and rightmost derivations are same for the given sentence.
27. What is a operator precedence parser? A grammar is said to be operator precedence if it possess the following properties:
1. No production on the right side is ε.
2. There should not be any production rule possessing two adjacent non terminals at the right hand side.
28. List the properties of LR parser. 1. LR parsers can be constructed to recognize most of the programming languages for which the context free grammar can be written.
2. The class of grammar that can be parsed by LR parser is a superset of class of grammars that can be parsed using predictive parsers.
3. LR parsers work using non backtracking shift reduce technique yet it is efficient one.
29. Mention the types of LR parser.
- SLR parser- simple LR parser
- LALR parser- lookahead LR parser
- Canonical LR parser
30. What are the problems with top down parsing? The following are the problems associated with top down parsing:
- Backtracking
- Left recursion
- Left factoring
31. Write the algorithm for FIRST and FOLLOW.
1. If X is terminal, then FIRST(X) IS {X}.
2. If X → ε is a production, then add ε to FIRST(X).
3. If X is non terminal and X → Y1,Y2..Yk is a production, then place a in FIRST(X) if for some i , a is in FIRST(Yi) , and ε is in all of FIRST(Y1),…FIRST(Yi-1);
1. Place $ in FOLLOW(S),where S is the start symbol and $ is the input right endmarker.
2. If there is a production A → αBβ, then everything in FIRST(β) except for ε is placed in FOLLOW(B).
3. If there is a production A → αB, or a production A→ αBβ where FIRST(β) contains ε , then everything in FOLLOW(A) is in FOLLOW(B).
32. List the advantages and disadvantages of operator precedence parsing. Advantages
This typeof parsing is simple to implement.
Disadvantages
1. The operator like minus has two different precedence(unary and binary).Hence it is hard to handle tokens like minus sign.
2. This kind of parsing is applicable to only small class of grammars.
33. What is dangling else problem? Ambiguity can be eliminated by means of dangling-else grammar which is show below:
stmt → if expr then stmt
| if expr then stmt else stmt
34. Write short notes on YACC. YACC is an automatic tool for generating the parser program.
YACC stands for Yet Another Compiler Compiler which is basically the utility available from UNIX.
Basically YACC is LALR parser generator.
It can report conflict or ambiguities in the form of error messages.
35. What is meant by handle pruning? A rightmost derivation in reverse can be obtained by handle pruning.
If w is a sentence of the grammar at hand, then w = γn, where γn is the nth right-sentential form of some as yet unknown rightmost derivation
S = γ0 => γ1…=> γn-1 => γn = w
36. Define LR(0) items. An LR(0) item of a grammar G is a production of G with a dot at some position of the right side. Thus, production A → XYZ yields the four items
37. What is meant by viable prefixes? The set of prefixes of right sentential forms that can appear on the stack of a shift-reduce parser are called viable prefixes. An equivalent definition of a viable prefix is that it is a prefix of a right sentential form that does not continue past the right end of the rightmost handle of that sentential form.
38. Explain handle. A handle of a string is a substring that matches the right side of a production, and whose reduction to the nonterminal on the left side of the production represents one step along the reverse of a rightmost derivation.
A handle of a right – sentential form γ is a production A→β and a position of γ where the string β may be found and replaced by A to produce the previous right-sentential form in a rightmost derivation of γ. That is , if S =>αAw =>αβw,then A→β in the position following α is a handle of αβw.
39. What are kernel & non-kernel items? Kernel items, whish include the initial item, S’→ .S, and all items whose dots are not at the left end.
Non-kernel items, which have their dots at the left end.
40. What is phrase level error recovery? Phrase level error recovery is implemented by filling in the blank entries in the predictive parsing table with pointers to error routines. These routines may change, insert, or delete symbols on the input and issue appropriate error messages. They may also pop from the stack.
41. What are the benefits of intermediate code generation? A Compiler for different machines can be created by attaching different back end to the existing front ends of each machine. A Compiler for different source languages can be created by proving different front ends for corresponding source languages t existing back end. A machine independent code optimizer can be applied to intermediate code in order to optimize the code generation.
42. What are the various types of intermediate code representation? There are mainly three types of intermediate code representations.
- Syntax tree
- Three address code
43. Define backpatching. Backpatching is the activity of filling up unspecified information of labels using appropriate semantic actions in during the code generation process.In the semantic actions the functions used are mklist(i),merge_list(p1,p2) and backpatch(p,i)
44. Mention the functions that are used in backpatching. · mklist(i) creates the new list. The index i is passed as an argument to this function where I is an index to the array of quadruple. · merge_list(p1,p2) this function concatenates two lists pointed by p1 and p2. It returns the pointer to the concatenated list. · backpatch(p,i) inserts i as target label for the statement pointed by pointer p.
45. What is the intermediate code representation for the expression a or b and not c? The intermediate code representation for the expression a or b and not c is the three address sequence
t1 := not c
t2 := b and t1
t3 := a or t2
46. What are the various methods of implementing three address statements? The three address statements can be implemented using the following methods.
- Quadruple : a structure with atmost four fields such as operator(OP),arg1,arg2,result.
- Triples : the use of temporary variables is avoided by referring the pointers in the symbol table.
- Indirect triples : the listing of triples has been done and listing pointers are used instead of using statements.
47. Give the syntax-directed definition for if-else statement. 1. S → if E then S1
E.true := new_label()
E.false :=S.next
S1.next :=S.next
S.code :=E.code | | gen_code(E.true ‘: ‘) | | S1.code
2. S → if E then S1 else S2
E.false := new_label()
S2.next :=S.next
S.code :=E.code | | gen_code(E.true ‘: ‘) | | S1.code| | gen_code(‘go to’,S.next) | |gen_code(E.false ‘:’) | | S2.code
Compiler Design – Set 4
48. Mention the properties that a code generator should possess.
- The code generator should produce the correct and high quality code. In other words, the code generated should be such that it should make effective use of the resources of the target machine.
- Code generator should run efficiently.
- Define and use – the three address statement a:=b+c is said to define a and to use b and c.
- Live and dead – the name in the basic block is said to be live at a given point if its value is used after that point in the program. And the name in the basic block is said to be dead at a given point if its value is never used after that point in the program.
49. List the terminologies used in basic blocks.
50. What is a flow graph? A flow graph is a directed graph in which the flow control information is added to the basic blocks.
- The nodes to the flow graph are represented by basic blocks
- The block whose leader is the first statement is called initial block.
- There is a directed edge from block B1 to block B2 if B2 immediately follows B1 in the given sequence. We can say that B1 is a predecessor of B2.
51. What is a DAG? Mention its applications. Directed acyclic graph(DAG) is a useful data structure for implementing transformations on basic blocks.
DAG is used in
- Determining the common sub-expressions.
- Determining which names are used inside the block and computed outside the block.
- Determining which statements of the block could have their computed value outside the block.
- Simplifying the list of quadruples by eliminating the common su-expressions and not performing the assignment of the form x := y unless and until it is a must.
52. Define peephole optimization. Peephole optimization is a simple and effective technique for locally improving target code. This technique is applied to improve the performance of the target program by examining the short sequence of target instructions and replacing these instructions by shorter or faster sequence.
53. List the characteristics of peephole optimization.
- Redundant instruction elimination
- Flow of control optimization
- Algebraic simplification
- Use of machine idioms
54. How do you calculate the cost of an instruction? The cost of an instruction can be computed as one plus cost associated with the source and destination addressing modes given by added cost.
MOV R0,R1 1
SUB 5(R0),*10(R1) 3
55. What is a basic block? A basic block is a sequence of consecutive statements in which flow of control enters at the beginning and leaves at the end without halt or possibility of branching.
Eg. t1:=a*5
56. How would you represent the following equation using DAG? a:=b*-c+b*-c
Compiler Design – Set 5
57. Mention the issues to be considered while applying the techniques for code optimization.
- The semantic equivalence of the source program must not be changed.
- The improvement over the program efficiency must be achieved without changing the algorithm of the program.
- The machine dependent optimization is based on the characteristics of the target machine for the instruction set used and addressing modes used for the instructions to produce the efficient target code.
- The machine independent optimization is based on the characteristics of the programming languages for appropriate programming structure and usage of efficient arithmetic properties in order to reduce the execution time.
- Available expressions
- Reaching definitions
- Live variables
- Busy variables
58. What are the basic goals of code movement? To reduce the size of the code i.e. to obtain the space complexity. To reduce the frequency of execution of code i.e. to obtain the time complexity.
59. What do you mean by machine dependent and machine independent optimization?
60. What are the different data flow properties?
61. List the different storage allocation strategies. The strategies are:
- Static allocation
- Stack allocation
- Heap allocation
62. What are the contents of activation record? The activation record is a block of memory used for managing the information needed by a single execution of a procedure. Various fields f activation record are:
- Temporary variables
- Local variables
- Saved machine registers
- Control link
- Access link
- Actual parameters
- Return values
63. What is dynamic scoping? In dynamic scoping a use of non-local variable refers to the non-local data declared in most recently called and still active procedure. Therefore each time new findings are set up for local names called procedure. In dynamic scoping symbol tables can be required at run time.
64. Define symbol table. Symbol table is a data structure used by the compiler to keep track of semantics of the variables. It stores information about scope and binding information about names.
65. What is code motion? Code motion is an optimization technique in which amount of code in a loop is decreased. This transformation is applicable to the expression that yields the same result independent of the number of times the loop is executed. Such an expression is placed before the loop.
66. What are the properties of optimizing compiler? The source code should be such that it should produce minimum amount of target code.
There should not be any unreachable code.
Dead code should be completely removed from source language.
The optimizing compilers should apply following code improving transformations on source language.
i) common subexpression elimination
ii) dead code elimination
iii) code movement
iv) strength reduction
67. What are the various ways to pass a parameter in a function?
- Call by value
- Call by reference
- Copy-restore
- Call by name
68. Suggest a suitable approach for computing hash function. Using hash function we should obtain exact locations of name in symbol table.
The hash function should result in uniform distribution of names in symbol table.
The hash function should be such that there will be minimum number of collisions. Collision is such a situation where hash function results in same location for storing the names.
COMPILER DESIGN Interview Questions with Answers Pdf Download
---- >> below are the related posts of above questions :::.
- 300+ TOP Compiler Design MCQs and Answers Quiz Exam
- 400+ Top Compiler Design Lab Viva Questions and Answers
- 250+ TOP MCQs on Lexical Analysis and Answers
- 250+ TOP MCQs on Cross Compiler and Answers
- 250+ TOP MCQs on Intermediate Code-Generation and Answers
- 250+ TOP MCQs on Syntax Analyser and Answers
- 250+ TOP MCQs on Top-Down Parsing and Answers
- What are the phases of a compiler?
- 250+ TOP MCQs on YACC Parser Generator and Answers
- 250+ TOP MCQs on LR Parser and Answers
- 250+ TOP MCQs on The Closure Compiler and Answers
- 250+ TOP MCQs on Handle of Right sentinel Grammar and Answers
- What is cross compiler?
- 250+ TOP MCQs on Data Structure for Representing Parsing Table Answers
- Define optimization?
- 250+ TOP MCQs on Bottom-Up Parsing and Answers
- Write down the various compiler construction tools?
- 300+ TOP THEORY of COMPUTATION MCQs and Answers
Leave a Reply Cancel reply
Your email address will not be published. Required fields are marked *

You don't have permission to access this content
For access, try logging in If you are subscribed to this group and have noticed abuse, report abusive group .
- BYJU'S GATE
- GATE Questions
Compiler Design GATE Questions

Compiler Design is an interesting topic covered in the GATE CSE Question Paper, and candidates are encouraged to solve and practise these Compiler Design GATE questions. Some of the main concepts that constitute the Compiler Design questions are Lexical Analysis, Code Generation and Optimization, Parsing and more. Candidates are also advised to refer to the collection of Compiler Design GATE Questions and Answers that we have compiled here in this article below.
Candidates can refer to these Compiler Design Questions and Answers for GATE, so that they will get the best results. Compiler Design is a crucial topic covered in the GATE CSE question paper. Solving these questions will help the candidates to prepare more proficiently for the GATE exams. Meanwhile, candidates can find the GATE Questions for Compiler Design in this article below to solve and practise thoroughly for the exams. They can refer to these GATE previous year question papers and start preparing for the exams.
Note: We shall be updating the answers/ solutions for these questions soon.
Compiler Design GATE Questions with Solutions
From The Compiler Design Topic of the GATE CSE Question Paper
MCQ- Single Answer Questions
1. Match the following:
- a-4, b-1, c-2, d-3
- a-3, b-1, c-2, d-4
- a-4, b-2, c-1, d-3
- a-4, b-1,c-3, d-2
2. Look at these statements given below. Which of these are true?
I. A programming language that 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 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
- I, II and V only
- II, III and V only
- I, III and IV only
3. Choose the correct statement from the following.
- LALR parser is more powerful than canonical LR parser
- The parsers SLR, Canonical CR, and LALR have the same power
- SLR parser is more powerful than LALR
- Canonical LR parser is more powerful than LALR parser
4. A linker is assigned object modules for a set of programs that were compiled separately. So, what is the information that needs to be included in an object module?
- Absolute addresses of internal symbols
- Object code
- Relocation bits
- Names and locations of all external symbols defined in the object module
5. Take a look at the basic block given below.
e = d – b
In this basic block given above, the respective minimum number of nodes and edges present in the DAG representation are_____
6. Which are the languages that necessarily need heap allocation in the runtime environment?
- Those that allow dynamic data structures
- Those that support recursion
- Those that use dynamic scoping
- Those that use global variables
7. ________ is not an advantage of using shared, dynamically linked libraries as opposed to using statically linked libraries.
- Faster program setup
- Smaller sizes of executable files
- Existing programs need not be re-linked to take advantage of newer versions of libraries
- Lesser overall page fault in the system
8. What are the number of tokens that will be generated by the scanner for the below given statement?
x = x ∗ (a + b) – 5
9. What is the data structure in a compiler used for managing information about variables and their attributes?
- Symbol table
- Symbol tree
- Abstract syntax tree
- Semantic stack
10. When is the symbol table, generated in a two-pass assembler?
- Generated in second pass
- Generated and used only in second pass
- Generated in first pass
- Not generated at all
11. _______ phase of compiler generates stream of atoms.
- Code Generation
- Syntax analysis
- Code Optimisation
- Lexical Analysis
12. What is the kind of derivation used by LR parsers?
- Rightmost in reverse
- Leftmost in reverse
13. What is the output of a lexical analyser?
- Machine code
- A parse tree
- A stream of tokens
- Intermediate code
14. From the below given data: a b b a a b b a a b which is not a word in the dictionary created by LZ-coding (the initial words are a, b)?
15. ________ among these listed below is a top-down parser.
- An LR(k) parser
- Operator precedence parser
- An LALR(k) parser
- Recursive descent parser
16. One of the purposes of using intermediate code in compilers is to________
- improve error recovery and error reporting
- increase the chances of reusing the machine-independent code optimizer in other compilers
- Improve the register allocation
- make parsing and semantic analysis simpler
17. What is the least number of temporary variables required to create a three-address code in static single assignment form for the expression q+r/3+s−t∗5+u∗v/w?
18. Debugger is a programming language that______
- allows to set breakpoints, execute a segment of program and display contents of register
- allows to examine and modify the contents of register
- does not allow execution of a segment of program
- All the above
19. Which among these is required to convert an infix expression to the postfix form efficiently?
- An operand stack and an operator stack
- An operator stack
- An operand stack
20. A CFG is not closed under ___________
- Concatenation
- Dot operation
- Union Operation
21 . Which of the following is incorrect for the actions of A LR-Parser
ii) reduce A->ß
iii) Accept
iv) reject?
- I), ii) , iii) and iv)
- I), ii) and iii)
- None of the above
22. Consider the grammar, E → E + n | E × n | n. For a sentence n + n × n, the handles in the right-sentential form of the reduction are________
- n, E+ n and E + n x n
- n, n + n and n + n x n
- n, E + n and E + E x n
- n, E + n and E x n
23. Which of the following grammar rules violate the requirements of an operator grammar ? P, Q, R are non-terminals, and r, s, t are terminals.
ii) P → Q s R
iv) P → Q t R r
(a) i) only
(b) i) and iii) only
(c) ii) and iii) only
(d) iii) and iv) only
24 . Look at the following code segment.
x = u – t;
y = t – z;
What is the minimum number of total variables required to convert the above code segment to static single assignment form?
25. Some code optimizations are carried out on the intermediate code because____
- program analysis is more accurate on intermediate code than on machine code
- the information from dataflow analysis cannot otherwise be used for optimisation
- they enhance the portability of the computer to other target processors
- the information from the front end cannot otherwise be used for optimisation
26 . State if the given statement is true or false: R->R|T T->ε is an ambiguous grammar
27. If a state does not know whether it will make a shift operation or reduction for a terminal, it is _________
- Reduce/ Shift conflict
- Reduce conflict
- Shift/ reduce conflict
- Shift conflict
28. The construction of the canonical collection of the sets of LR (1) items and LR (0) items are similar. Which of these will be an exception?
- Closure and go to operations work similarly
- Closure and associatively operations work slightly different
- Closure and go to operations work slightly different
- Closure and additive operations slightly different
29. Which among these is the most powerful parsing method?
- Canonical LR
30. Which of these classes of statements below usually produces no executable code when compiled?
- Input and output statements
- Declaration
- Assignment statements
- Structural statements
31. Which of these below given statements about peephole optimisation is true?
- It can be applied to a portion of the code that is not contiguous
- It is applied to a small part of the code and applied repeatedly
- It is applied in the symbol table to optimize the memory requirements
32 . Linking:
- cannot be performed after relocation
- is not required if relocation is performed
- cannot be performed before relocation
- can be performed both before and after relocation
33. In compiler terminology, what does reduction in strength mean?
- Removing common subexpressions
- Replacing run time computation by compile time computation
- Replacing a costly operation by a relatively cheaper one
- Removing loop invariant computation
34. What is the graph that shows basic blocks and their successor relationship, called as?
- Hamilton Graph
- Control Graph
35. Loop unrolling is a code optimisation technique:
- That improves performance by decreasing the number of instructions in a basic block
- That reorders operations to allow multiple computations to happen in parallel
- That avoids tests at every iteration of the loop
- That exchanges inner loops with outer loops
36. 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 sub expression, in order to get the shortest possible code,___
- E2 should be evaluated first
- E1 should be evaluated first
- Order of evaluation of E1 and E2 is of no consequence
- )Evaluation of E1 and E2 should necessarily be interleaved
37. What is the identification of common sub-expression and replacement of runtime computations by compile-time computations?
- Data flow analysis
- Constant folding
- Loop optimisation
- Local optimisation
38. Who has the responsibility for code optimisation?
- Operating system
- Application programmer
- System programmer
- All of these
39. What is the dead- code elimination in machine code optimisation referred to?
- Removal of the values that never get used
- Removal of function which are not involved
- Removal of all labels
- Removal of a module after its use
40. Which of these below given operations are not performed during compilation?
- Type checking
- Dynamic memory allocation
- Inline expansion
- Symbol table management
41. Substitution of values for names who have constant values are done in_____
- Strength reduction
42. In which, are the bodies of the two loops merged together to form a single loop, provided that they do not make any references to each other?
- Loop Jamming
- Loop unrolling
- Loop concatenation
43 . What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon and unit-production (i.e., of type A→ϵ and A→a) to parse a string with n tokens?
44. The number of tokens in the Fortran statement DO 10 I = 1.25 is_____
45. Which one of the following statements is false?
- In un-typed languages, values do not have any types
- In statically typed languages, each variable in a program is associated with values of only a single type during the execution of the program
- In statically typed languages, each variable in a program has a fixed type
- In dynamically typed languages, variables have no types
46. Look at the below given statements :
S1 : The front end of compiler consists of Lexical analyser , Syntax analyser and semantic analyser.
S2 : Target code generator is known as the back-end of compiler.
S3 : Code optimizer is middle end of compiler and is a optional phase in compiler.
Which among these above given option is correct ?
- Only S1 and S2 are correct
- Only S1 and S3 are correct
- Only S2 and S3 are correct
- None of the above are correct
47. Which of the following menu types are also known as drop-down menus?
48. Data is stored in computer as______
- Directories
49. The register or the main memory location that contains the effective address of the operand is known as________
- special location
- Indexed register
- Question does not provide sufficient data or is vague
50. What is object code the output of?
- Only assembler
- Only compiler
- Compiler or Assembler
Candidates are advised to download additional resources such as the GATE preparation materials or the GATE CSE previous year papers from BYJU’S. Stay tuned and access the updates when they go live!
Leave a Comment Cancel reply
Your Mobile number and Email id will not be published. Required fields are marked *
Request OTP on Voice Call
Post Comment

Connect with us for GATE Preparation
Register now to get complete assistance for the gate 2022 exam.
- Share Share
Register with BYJU'S & Download Free PDFs
Compiler Design Interview Questions
If you're looking for Compiler Design Interview Questions for experienced or freshers, you have come to the correct place. You can use the Compiler Interview Questions to ace your next interview and land the job of your dreams as a compiler developer. There are several job chances available from many reputable businesses worldwide. All the frequently asked compiler design interview questions are obtained from technical experts and google sources.
- Abstraction in Java
- Clojure Tutorial
- Control Statements in Java
- Core Java Interview Questions
- Data Types in java
- Top 9 Java EE Frameworks
- Java EE vs Spring Framework
- Java Frameworks List - Top 14 Java Frameworks
- Java Interview Questions
- Java Tutorial
- Java Web Dynpro Interview Questions
- JavaFX Interview Questions
- Method Overloading in Java
- Multithreading in Java
- List of Popular Open Source Java Build tools
- Operators in Java
- Program Logics in Java
- String Handling in Java
- Why You Should Learn Java Programming
- Data structures Interview Questions
- Exception Handling in Java
- Multithreading Interview Questions
- Design Patterns Interview Questions and Answers
- C++ Interview Questions and Answers
- JSP Interview Questions
- EJB Interview Questions
- SOAP in Web Services
- JPA Interview Questions
- DXC Interview Questions and Answers
- Java Architect Interview Questions
- Java Concurrency Interview Questions
- What is Java Concurrency?
- What is JPA - Complete Tutorial Guide
- What is EJB?
- Java Collections Interview Questions
- Java Swing Tutorial
- Java Stream Tutorial
- Linked List Interview Questions
- Java Collection Tutorial
- Java Stream Interview Questions
- Thymeleaf vs JSP
- Thymeleaf Tutorial - What is Thymeleaf
- Socket Programming in Java - What is TCP
- Apache Tomcat Interview Questions
- Explore real-time issues getting addressed by experts
- Test and Explore your knowledge
- Experienced
Compiler design is the process of converting a high-level programming language into computer-executable machine code. The process of converting source code written in one programming language (the source language) into code written in another computer language (the target language) is known as compiling.
Practice the top Compiler Design Interview Questions that are useful for your Interview preparation. If you're applying for a position requiring compiler design knowledge, you must be prepared to address questions about the topic. This article will provide frequently asked questions about compiler design interviews and how to respond to them.
Before moving on to more in-depth, technical questions, interviewers can better grasp your personality by asking general questions like compiler design. We have categorized the compiler design interview questions based on the following:
Top 10 Frequently Asked Compiler Design Interview Questions
- What is a compiler?
- What is compiler design?
- What tools are used for writing compilers in Python?
- What are the two types of compiler design?
- What is bootstrapping in compiler design?
- What is Parsing in Compiler Design?
- What is the fastest compiler language?
- What is the Application of Compilers?
- What is Backpatching in compiler design?
- What is a linker in compiler design?
Top Interview Questions for Fresher Graduates
1) what is a compiler.
A computer program called a compiler converts source code written in a high-level language into a low-level machine language.

2) What is compiler design?
Compiler design involves developing software that can read and interpret source code written in a human language and produce binary code that can be read and understood by a computer. A compiler is a tool responsible for this transformation; it reads the source code, checks it for mistakes, and outputs the program in machine language. The generated binary code can be directly used on a computer without extra processing.
3) List various types of compilers.
There are three types of compilers are described below:
- Single-Pass Compilers
- Two-Pass Compilers
- Multipass Compilers
4) What is an assembler?
When run on a computer, programs written in assembly language are converted into machine language using a piece of software known as an assembler.
5) What is a Symbol Table?
A symbol table is a database in which each identifier is represented by a record that includes fields for the identifier's attributes. Because of the database's organization, we can easily store or get information from the correct record based on identification. A lexical analyzer will add an identifier to the symbol table whenever it finds one. A lexical analyzer cannot deduce an identifier's properties.
6) What tools are used for writing compilers in Python?
The PLY toolkit is now the most widely used tool for creating compilers in Python. PLY is an implementation in Python of the well-known C tools Lex and Yacc, which are used for writing compilers in C.

7) What Is Code Motion?
Code motion is an optimization approach whereby a loop's total number of lines of code is reduced. Any expression that finishes with the same value after being run through the loop can benefit from this change. You can find this kind of statement right before the loop.
8) Explain what YACC is?
The YACC is a construction tool for the Unix compiler. It is put to use in the process of generating a parser, a piece of software that determines whether or not the source code for a program is valid by the syntactic rules of the language. In most cases, YACC is used in conjunction with the lexical analyzer tool, which produces a lexer.
9) Differentiate Tokens, Patterns, and Lexeme.
- Tokens: Tokens are character sequences that have significance when taken together as a whole.
- Patterns: Patterns are recurring occurrences of the exact string in the input that result in the generation of the same token in the output. The rule referred to as a pattern is associated with the token and is used to characterize this group of strings.
- Lexeme: It is a string of characters in the source code used to determine whether or not a token should be granted access. The fundamental units of any language are called tokens.
10) What Are The Benefits Of Intermediate Code Generation?
- Making a compiler for several machines is as simple as connecting a new back end to the front end of each device.
- You can make a compiler for multiple languages by connecting their respective front ends to the same back end.
- The code generation process can be optimized by applying a machine-independent code optimizer to intermediate code.
11) What are the six phases of a compiler?
The 6 phases of a compiler are:
- Syntactic Analysis or Parsing.
- Intermediate Code Generation.
- Lexical Analysis.
- Code Optimization.
- Code Generation.
- Semantic Analysis.

12) What are the two types of compiler design?
The two types of compiler design are:
- Cross-compiler: In the field of compiler design development, a cross-compiler is a discussion board that facilitates the creation of machine-readable code.
- Source-to-source compiler: A source-to-source compiler is used to translate source code from one programming language into another code.
13) What is meant by three address codes in the compiler?
As an intermediate code, three-address code is simple to produce and even simpler to translate into machine language. An expression can be represented by no more than three addresses and a single operator. The value computed at each instruction is saved in a temporary variable established by the compiler.
14) What are the compiler design tools?
The tools used for compiler construction are as follows:
- Scanner Generator
- Parser Generator
- Data-flow analysis engines
- Automatic code generators
- Compiler construction toolkits
- Syntax-directed translation engines
15) Describe the Front End Of A Compiler?
A compiler's front end comprises the components of stages that are mainly device-independent and typically rely on the source language. The front end can also be used for some code optimization. Includes dealing with errors at each of those steps as well. Such factors include
- Semantic evaluation
- Lexical analysis
- Syntactic analysis
- Generation of intermediate code
- The introduction of the symbol table
16) Describe the Back-end Phases Of A Compiler?
The back-end phases of a compiler consist of the parts specific to the targeted machine that does not rely on the source language but on the intermediate language. One such example is:
- Code optimization
- Code generation, along with error handling and symbol-table operations
17) Which language is used in compiler design?
A user creates a program using the C programming language (high-level language). The software is compiled using the C compiler, which then transforms it into an assembly program (low-level language). Afterward, software called an assembler converts the assembly program into machine code (object).
18) What tools are used for compiler construction?
Tools for creating compilers are the same as those for creating other programming languages like Java and C++. Examples of this are:
- A lexical analyzer
- A compiler frontend
19) What is bootstrapping in compiler design?
Bootstrapping is a type of compiler design in which the compiler uses an in-house language to implement the entire language rather than a different language for each language being compiled.
20) Can you explain context-free grammar and its importance in compiler design?
Grammar is a set of rules that specify how a language might be formed. A context-free grammar is a type of grammar. It is an important point in the design of compilers since the compiler needs to comprehend the structure of the programming language it is translating into machine code to do it accurately.

Top Interview Questions for Experienced Professionals
21) what is sdd in compiler design.
A type of abstract specification is called syntax-directed definition (SDD). It is an extension of context-free grammar where each grammar production X -> a has a set of production rules connected with the type s = f(b1, b2,......bk) where s is the attribute acquired from function f. A string, number, type, or memory location can be used as the attribute. Semantic rules are code snippets typically added at the end of production and enclosed in curly brackets.
Example: E --> E1 + T { E.val = E1.val + T.val}
22) What Is syntax in compiler design?
After lexical analysis, the second phase is syntax analysis or parsing. It examines whether or not the input has been provided in a way that complies with the syntax rules of the language in which it has been written by analyzing the syntactic structure of the data that has been provided.
23) What is Parsing in Compiler Design?
The process of moving information from one format to another is called "parsing." Parsing can complete this task automatically. The parser is a part of the translator that helps to arrange the linear structure of the text by a predetermined set of rules called grammar.
24) What is lexical analysis?
The technique of determining which lexemes are present in a sentence is known as lexical analysis. Words and morphemes are common names for lexemes, the more fundamental units of meaning in a language. Lexemes are also sometimes referred to as morphemes. Lexical analysis is used not just for studying written texts and phrases spoken aloud. However, it also has applications for analyzing the spoken language used in naturalistic research.

25) What is an overview of the structure of a typical compiler?
Lexical analyzers, code generators, parsers, and optimizers are the backbone of any compiler. Each line of code is parsed into individual tokens by the lexical analyzer. The parser then analyzes the code's structure and produces a code tree. After the code tree is constructed, the code generator converts it into machine code or assembly language. The final step is for the optimizer to examine the resulting code and perform any necessary optimizations.
26) What is a linker?
A linker is a piece of software that helps connect many files. When you want to automate the process of merging two or more files, for example, when integrating a program with its data file, this is the method that is typically used.
27) What are the two parts of a compilation?
The front matter and contents comprise the two components of a compilation.
Front Matter: The first part of a book is called the front case, and it includes details such as the author's name, the book's title, the publishing date, and information on the author's copyright. Content: The contents of a book include everything that can be found in the central part of the text, such as the chapters, sections, and appendices.
28) What are compilers and interpreters?
- Compiler: A compiler translates the complete source code in a single run. A compiler is more efficient than an interpreter since it requires less time to complete the task.
- Interpreters: An interpreter performs a line-by-line translation of the complete source code. The interpreter requires much more time than the compiler, which means it is considerably slower than the compiler.

29) Why is parsing important for compiler design?
As the process of transforming code from one form to another, parsing is important to compiler design. A compiler must be capable of parsing the code to comprehend and produce the correct output.
30) Define Compiler-compiler.
Compiler-compilers, compiler-generators, and translator-writing systems are all names that have been used to refer to different types of software that assist in developing compilers. To a large extent, they are centered on a specific model of languages. As a result, they are suited for the generation of compilers for languages that share a similar model.
31) What is the fastest compiler language?
C++ is an easy and efficient programming language. Its fast runtime and extensive collection of Standard Template Libraries make it a favorite among competitive programmers (STL).
32) What are the properties of optimizing a compiler?
The properties of an optimizing compiler are:
- It is a collection of directives that transforms source code into a form that may be executed.
- It results in a smaller overall size of the code.
- It leads to an improvement in performance.
- It improves the overall quality of the code.

33) What are the basic goals of code movement?
The primary objectives of code movement are to guarantee that the source code will be preserved and made accessible to the developers of the project, as well as to guarantee that the output of a program that is executed on one platform will be compatible with the output generated by programs running on other platforms.
34) List the various compiler construction tools.
- Compiler tool: Building a Compiler Instruments
- Debugger: a tool for stepping into a program at predetermined times and setting breakpoints
- Source code management tool: A source code management tool is needed to monitor and control the project's codebase and its reliant projects.
- Performance profiling tool: You can determine how much time and space your software use with a performance profiling tool.
35) Write a regular expression for an identifier?
Let's say that a regular expression for an identifier is something like /[a-z]+$/, for example. In that scenario, the identifier will be checked against the string "a-z" + to establish whether or not it is a legitimate identifier. If it is not legitimate, the resulting string should not be considered a match if it does not match the pattern /[a-z]+$/. If it does match, it should be deemed a match.
36) What are some examples of compile-time and runtime errors?
Any fault during the software compilation process is a compile-time error. Any error that occurs while a program is being executed is referred to as a runtime error.
Examples : Syntax mistakes, type errors, and name errors are all examples of errors that might occur during the compilation process. Error during the runtime includes illegal type conversion, division by zero, and indexing outside the allowed range.
37) What does semantic analysis do?
Semantic analysis is an essential component of compiler design. It analyzes the significance of the logical structure of a program and then disassembles it into its parts. It assists in comprehending how the program operates and its tasks and ensuring that the compiler generates code that adheres to the structure.
38) What are the various types of intermediate code representation?
When a high-level language is represented as an intermediate code, it is translated into a simpler language. It is also translated into other languages and called a compilation.
It's common to practice using a variety of intermediate code representations in the programming field. Examples of this are:
- interpreter
- code generation
- jit (just in time) compiler
39) Can you explain what syntax and semantics mean in the context of compiler design?
While semantics relates to the meaning of the language, syntax refers to the rules guiding the structure of a programming language. A compiler must comprehend both the syntax and semantics of the source and destination languages to translate code from one language to another correctly.
40) What Are The Properties Of Optimizing Compilers?
- The code must be written to generate the smallest possible amount of the desired code.
- Currently, there can be no inaccessible source code.
- Any and every unused or unnecessary code must be eliminated from the source code.
- The code improvements should be applied by optimizing compilers to the source language.
- Elimination of Frequent Subexpressions.
- Power savings, code migration, and the eradication of useless codes.
Frequently Asked Questions
41) can you explain the various function parameter passing options.
- Call by call
- Call by fee
- Copy-restore
- Call via reference
42) Define Symbol Table.
A symbol table is a type of data structure that the compiler uses to track how the variables are used. It keeps records of names and information about how they are used and bound.
43) What is the Application of Compilers?
Here are some important applications of Compilers:
- Compilers are helpful tools for putting into practice higher-level programming languages.
- It offers support for optimization for parallelism in computer architecture.
- It is used in designing new memory structures for computer systems.
- It is used extensively in programs that translate.
- It can be used in the synthesis of hardware, the translation of binary, and the interpretation of database queries, among other program translations.
- It is simple to use in conjunction with various other software productivity tools.
44) Which language is used in compiler design?
45) why is compiler design used.
The principles of compiler design provide an in-depth look at the translation and optimization processes. The design of a compiler includes the primary translation mechanism, error detection, and recovery. It includes frontend lexical, syntax, semantic analysis, back-end code generation, and optimization.
46) Is compiler design difficult?
The process of building a compiler is a difficult one. A good compiler takes concepts from formal language theory, the study of algorithms, artificial intelligence, systems design, computer architecture, and the theory of programming languages and applies them to translate a program. Other areas of expertise include studying artificial intelligence and computer systems design.
47) What is Backpatching in compiler design?
Backpatching involves filling in blanks with unclear information. Label information is provided here. In essence, it generates code by performing the relevant semantic activities. When constructing TACs for the supplied expressions, it may mention the Label's address in goto statements.
48) Is the compiler software or hardware?
The compiler is a piece of software that takes a program written in a high-level language (the Source Language) and translates it to a low-level language (the Object/Target/Machine Language/0, 1's).
49) Who compiles the compiler?
An assembler and machine code can be used to create a very basic compiler. You can use the initial compiler to create a more complex one once you have software that can convert data into binary instructions.
50) What is an example of a compiler?
Examples of compilers are Java, C, C++, and C#.
51) What is a linker in compiler design?
When many object files (created by a compiler or an assembler) need to be combined into a single executable file, library file, or other "object" file, a linker or link editor is the computer system tool used to do so.
To get a job as a compiler designer, you may need to go through an interview process. Preparing a Compiler design interview questions and answers that interviewers may ask can help you answer them confidently and advance to the next interview stage. This compiler design interview questions tutorial will teach you the fundamentals of compiler design and advanced concepts such as component and architect to help you ace the interview.
Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!

Madhuri is a Senior Content Creator at MindMajix. She has written about a range of different topics on various technologies, which include, Splunk, Tensorflow, Selenium, and CEH. She spends most of her time researching on technology, and startups. Connect with her via LinkedIn and Twitter .

Copyright © 2013 - 2023 MindMajix Technologies
Compiler Design Assignments
Assignment 1.
- Identifiers: alphanumeric strings starting with an alphabet, and can also contain special character '_' where you allow it is up to you, but state your decisions in your documentation. Examples x, ab_2y, c2 etc.
- Numbers, which include integers, fixed point and floating point numbers. Leading zeros and redundant trailing zeros are disallowed; e.g., 002 is invalid, 2.00 is invalid but 2.0 is valid. Real numbers can be represented in the E (exponential) format as well (e.g. 2.0E-2 is valid and represents 0.002). Decisions whether 2.0E+2 is valid are up to you.
- white space (sequences of blank, tab, newline)
- Arithmetic operators: +, -, /, *, div , mod
- Logical constants: true , false
- Logical operators: not , and , or
- Comparison operators: <=, >=, <, > , =
- Parentheses: (, )
- Any add-ons are welcome.
Generate tokens from the regular expression using ML-Lex
- Use noweb as a literate programming tool. Make the documentation such that your code is easily understandable. State all your decisions clearly.
- Write a Makefile to separate out the documentation and code.
Assignment 2
- E -> E+E | E*E | E-E | E div E | E / E | E mod E | (E)
- B -> E <= E | E >= E | E < E | E > E | E = E
Assignment 4
McqCollection.com
सा विद्या या विमुक्तये.
Home » Computer-Engineering » Top 50+ Compiler Design questions and answers | set -1
Top 50+ Compiler Design questions and answers | set -1
MCQ2022 Complier Design , Computer-Engineering 0
Here we are going to see a list of important Compiler Design questions and answers for competitive exams and interviews. These frequently asked Software Testing multiple-choice Questions for job interviews and placement tests also helpful for college and competitive exams and also improve your knowledge.
11. ______________ is not an advantage of using shared, dynamically linked libraries as opposed to using statically linked libraries.
- Lesser overall page fault rate in the system
- Faster program startup
- Existing programs need not be relinked to take advantage of newer versions
- Smaller sizes of executable files
3. Existing programs need not be relinked to take advantage of newer versions
12. Which of the following statements about peephole optimization is False?
- It is applied to a small part of the code
- It can be used to optimize intermediate code
- To get the best out of this, it has to be applied repeatedly
- It can be applied to the portion of the code that is not contiguous
4. It can be applied to the portion of the code that is not contiguous
13. In the correct grammar from question 23 to generate the string al bm with l ≠ m, the length of the derivation (number of steps starting from s) is
- max (l, m) + 3
- max (l, m) + 2
2. max (l, m) + 2
14. Substitution of values for names (whose values are constants) is done in
- Local optimization
- Loop optimization
- Constant folding
- Strength reduction
3. Constant folding
15. For the expression grammar
- E->E*F I F+E I F
- F->F – I id
- The statement, which holds true, is
- + and – have same precedence
- Precedence of * is higher +
- Precedence of – is higher *
- Precedence of + is higher *
3. Precedence of – is higher *
You may be interested in : Top 50+ C Programming MCQ questions
16. which of the following class of statements usually produces no executable code when compiled.
- declaration
- assignment statements
- input and output statements
- structural statements
1. declaration
17. The string that is generated by the grammar is
18. the compiler can detect what type of errors.
- neither logical nor grammatical error
- logical errors only
- grammatical errors only
- both grammatical and logical errors
3. grammatical errors only
19. The number of derivation trees for the correct answer strings to question 30 is
20. fortran programming language is a _______.
- Turing language
- Context-sensitive language
- Context-free language
- Regular language
2. Context-sensitive language.
Read More Section
- Basic_Computer Set – 1
- Basic_Computer Set – 2
- c programming
- C++ Programming
- Data Structure Set – 1
- Data Structure Set – 2
- Advance Java
- Operating System Set – 1
- DBMS Set – 1
- Distributed DBMS Set – 1
- Linux Set -1
- Unix Set – 1
- Computer Architecture Set – 1
- Software Engineering Set – 1
- C# Programming Set – 1
- Computer Networking Set – 1
- System Programming Set – 1
- HTML Set – 1
- CSS Set – 1
- Javascript Set – 1
- PHP Set – 1
- Theory of Computation Set – 1
- Theory of Computation Set – 2
- Information and Network Security Set – 1
- Python Programming Set – 1
- Python Programming Set – 2
- Android Programming Set – 1
- IOS Programming
- Digital Image Processing Set – 1
- Cloud Computing Set – 1
- Computer Graphics Set – 1
- Computer Graphics Set – 2
- Net Technology Set – 1
Be the first to comment
Leave a reply cancel reply.
Your email address will not be published.
Save my name, email, and website in this browser for the next time I comment.
Copyright © 2023 | Contact Us | Privacy Policy | DMCA | About Us
- Computer Engineering
- Electrical Engineering
- Mechanical Engineering
- Civil Engineering
- Basic_Computer
- Power Point

- Edit my Profile
- My favorites
- Previous Years
Recent questions and answers in Compiler Design
- gatecse-2023
- compiler-design
- syntax-directed-translation
- numerical-answers
- nielit-sta-2020
- compilation-phases
- live-variable
- theory-of-computation
- regular-expression
- gatecse-2021-set2
- gatecse-2016-set1
- static-single-assignment
- gatecse-2003
- gatecse-2005
- gatecse-2015-set1
- viable-prefix
- three-address-code
- lexical-analysis
- error-detection
- register-allocation
- ace-test-series
- made-easy-test-series
- made-easy-booklet
- left-recursion
- dynamic-programming
- intermediate-code
- pushdown-automata
- context-free-grammar
- descriptive
- gateforum-test-series
- code-optimization
- operator-precedence
- first-and-follow
- number-of-dfa
Subscribe to GATE CSE 2023 Test Series
Subscribe to go classes for gate cse 2023, recent posts.
- NIELIT Scientist – 'B' 2023
- IIT MADRAS RESEARCH ADMISSION PORTAL 2023
- Chennai Mathematical Institute (CMI) 2023
- IIIT HYD PGEE 2023
- GATEOverflow Rank Predictor for GATE CSE - Pragy's App
- All categories
- General Aptitude (2.5k)
- Engineering Mathematics (9.3k)
- Digital Logic (3.3k)
- Programming and DS (5.9k)
- Algorithms (4.6k)
- Theory of Computation (6.7k)
- Compiler Design (2.3k)
- Operating System (5.0k)
- Databases (4.6k)
- CO and Architecture (3.8k)
- Computer Networks (4.7k)
- Non GATE (1.3k)
- Others (2.4k)
- Admissions (650)
- Exam Queries (843)
- Tier 1 Placement Questions (17)
- Job Queries (76)
- Projects (9)
- Unknown Category (854)
Recent Blog Comments
- MS Admission ::IIT / IISc programme 2 winter year...
- How many submissions can we expect this...
- please guide me, if someone has given interview...
- Hey darshan you are so strong man . i can really...
- @rohitrp what was your gate score and ?...
- Send feedback
- Rank Predictor
- College Prediction
- Useful Links
- Corrections
- Testimonials
- Search tips
- Exam Category
- Blog Category
- Test Series
Compiler design assignment questions and answers jobs
My recent searches.
- Featured Jobs
- Recruiter Jobs
- Full Time Jobs
...invoked when mprotect system call is made. vm area mprotect takes the current context, address, length, and required protection as arguments. If the provided address is not part of any vm area, then mprotect should fail and return -EINVAL. As part of this task, you are expected to modify access protection of the VMA in the range (addr, addr+ length-1) as shown in Figure 1. Change in access protections of a VMA can lead to the splitting/ merging of VMAs. Validation Procedure: • In this part of the assignment , we will validate the state of VM area, a singly linked list pointed to by vm area field in struct exec context in include/context.h. We will examine the vm area linked list before and after the mprotect syscall. • There can be at most 128 vm are...
We're planning to launch a very quick and basic prototype of a CMS based website to validate the merit of using Strapi/React/Gatsby for this type of project. The site will be a combination of searchable articles and searchable databases of FDA approved drugs and clinical trials: 1. Wellness: a searchable and filterable repository of articles 2. Drugs: a searchable/filterable drug database with lots of metadata and explanation 3. Trials: it's a database of active clinical trials people can join More detail will be provided upon further discussion. If you're interested in this job, answer the following questions .
Hello, Please provide 3 environment renderings like you've done for me in the past (a new room though). Please use your creativity and let me know if you have any questions !
Please find the attached document for assignment details Note - Assignment should be plagiarism free.
...Shopify site is already created, it get 50 to 100 orders a day and receives about 1000 hits per day. The requirements are: • speaks fluent English [written and spoken] • has extensive previous experience in the management of a Shopify store • has extensive experience handling difficult customer service situations and providing solutions to customers in a way that leaves them happy and does not harm the store • has experience in writing advertising texts or at least understands the basic principles of sales to be able to review and give his opinion to the editorial team • has relevant work experience [at least 2 years] • is available to start immediately and participate in this task continuously • Is ...
...Registration and Login: Allow users to create accounts and log in with their credentials. Product Management: Vendors should be able to add, edit, and delete their products, as well as manage their inventory. Order Management: Allow vendors to view and manage their orders, including shipping, tracking, and refunds. Payment Gateway Integration: Support for multiple payment gateways, such as PayPal, Stripe, and others. Search and Filter: Allow users to search and filter products based on various criteria, such as price, category, location, etc. Reviews and Ratings: Enable users to leave feedback on products and vendors to help other customers make informed decisions. Messaging: Provide a messaging system that allows ven...
I am looking for a basic 2D racing game wi...provide. The game should have an endless runner mode with obstacles and rewards, and AdMob integration with banner and rewarded video ads. However, I must inform you that I have a very limited budget for this project. If you feel that you are unable to create the game within my budget, you may consider using pre-existing game source code from the internet. Please ensure that the source code is open-source and has the necessary licenses to use commercially. Please also provide me with the source code for review before proceeding with any work. Please let me know if you have any questions or concerns regarding this. I hope we can work together to create a fun and engaging game within my budget. Thank yo...
Looking for someone to design modern, sleek direct-response funnels. I have the copy. You make it look great. Most of my pages/sites are in GrooveFunnels right now so I'd prefer to continue using that. How best to work with me: 1. Do what you say you're going to do when you say you're going to do it. Don't make promises you can't keep. Don't make excuses or create reasons why you can't get the work done (I've heard it all already... there's only so many times you can hear that a freelancer's power went out or they had a death in the family or there was a storm). Keep your deadlines no matter what. 2. Don't fall off of the face of earth... stay in communication. 3. Use the tracker. Don't come up with lame reasons why you ca...
...also be approachable and able to build trust. This is a task for a sleuth. How best to work with me: 1. Do what you say you're going to do when you say you're going to do it. Don't make promises you can't keep. Don't make excuses or create reasons why you can't get the work done (I've heard it all already... there's only so many times you can hear that a freelancer's power went out or they had a death in the family or there was a storm). Keep your deadlines no matter what. 2. Don't fall off of the face of earth... stay in communication. 3. Use the tracker. Don't come up with lame reasons why you can't use the tracker ("It crashed" or "I forgot to use it" or “it doesn’t work on this device...
Looking for the engineer who has past working experience preparing the Landing Zone documents for onboarding the GCP customers, should be able to answer the my questions , and help me prepare the questioner to customer to be onboarded.
Few line of Python code for assignment .
Please look at attached documentation. Do not apply if you haven't read it, canned answers /bids will be ignored. To proof you are not a bot please provide the API endpoint included in the sample request, if not provided, your response will also be ignored. Also we will take your bid as final. We will discard freelancers that fish with a low price and then request additional budget. This project is a widget to deliver content based on a given ID. The only complex step is to build a dynamic form based on required fields for the report. Render of report comes from a PDF file. it's a simple 3 step process very well described in the attached file. Specific questions are welcome.
Job Summary: ***(Read and provide the last questions to be considered)*** We are seeking a virtual freelance CFO with expertise in tax and QuickBooks software to evaluate the current state of our organization's books and bank statements. The CFO will then develop a plan to reorganize our books for the past five years, ensuring all entries from bank statements, receipts, contractor pay, and budgets are accurately placed into the correct chart of accounts. The CFO will oversee two data entry personnel and ensure that the entries are correct. Additionally, this person will create systems and tools for communication of all parties, along with a repository of information while keeping the company data secure. Interested parties must forward ...
I need someone to evaluate a paper in accordance with my reviewing guide in 100% human writing, as I have a reviewing guide and a reviewing assignment .
Hi, I have a batch of inputs (thousands of rows in a Sheet) that I want to run these prompts ChatGPT and copy the ChatGPT answers to CSV/sheet. We can use ChatGPT API. Sample task: I want to rewrite sentences in a sheet (1000 rows). My ChatGPT Prompt: Rewrite this [text] and come up with a subject line and category. Give the output in table format The output sheet will have 3 columns, showing input and output columns. I will share the sheet of real input and expected output in chat. --- Mention " I read your task. You can share the sheet" to stand out from automated bids.
I have a requirement to build a small WhatsApp bot that does the following: a) User Onboarding: It shares a form to first time users. The response to the form is stored as user profile information b) Any user accessing the bot thereafter is asked 3-4 questions . The response to these questions is clubbed along with the user profile information to form a query for ChatGPT. The response to this query is shared with the user
Human Resource Specialist (m/f/d) Responsibilities: Responsibility for recruiting employees in the European area, including creating job postings and conducting interviews Communication with potential candidates via email, phone, or video conference to inform them about job openings and answer questions Creation and management of Google spreadsheets to track applications and generate reports on recruitment activities Analysis of job market trends and research of new job markets to expand our recruitment strategy Communication with job markets and employer associations to stay informed about current developments in the job market and expand our network Collaboration with other departments to ensure that recruitment meets the needs of...
Looking for someone to do an assignment about Advocacy and Rights in Social Care. Message me for more details
...keep track of stock in and stock out all on excel spreadsheets. We would like the excel sheet at the end of each month to be able to tell us how much of each product was used by each vet and area of the business so we can compare it back to our billing at the end of each month. We would also like it to be able to tell us the cost of stock that we have sitting in the building at any given time. We currently have vets sign out drugs by hand on paper however we would like to get them to this via the excel sheet so then it automatically adjusts on the spreadsheet. This will also be used to help us figure out when we need to order certain items if we are low at end of each day etc. We have 3 separate areas of the business but will have 1 main stock room with all coming and ...
...looking for a freelancer to create and promote a survey targeted towards parents who have a son/daughter currently in 11th Standard or students who are in 11th Standard. The survey will ask questions about the participant's expected marks in PCM/B and their basic data. Location preference: Bibwewadi (411037) and Dhankawadi (411043) Deliverables: Create a survey page on our WordPress site that clearly outlines the survey details and what the participant will receive after completing the survey. Create a Google sheet to collect survey responses and embed it on the survey page. Create Facebook and Google ads to promote the survey. Create gift ideas Run the campaign in the specific location to ensure only the intended participants par...
Hello, We are developing a streaming platform and have an automated workflow to upload videos to a s3 bucket that runs a pre configured AWS Media Convert job that outputs hls and dash for adaptive streaming. I would like someone with good knowledge to improve the output groups to improve compatibility. I attached the current settings, we would like to utilize av1 where available to save on transfer costs, and h264 for a CMAF output that can be shared for both HLS and DASH. We would like to include some codecs specifically for backwards compatibility for as long back as h264 became supported. we have 3 input languages and identify by order, 1 is es, 2 is en and 3 is pt. For any questions let me know
Assignment link - In the report come up with 5 different vulnerabilities, explain how to exploit and recommendations. Must include the screenshots used of all commands in the must be in between 1000 to 1500 words.
...motivated sales professionals to join our team and help us promote the Arohan project, an initiative that empowers rural entrepreneurs and promotes sustainable economic development in India. The "Arohan" project is a joint initiative between Infosys and The Better India, aimed at empowering rural entrepreneurs and helping to build a sustainable rural economy in India. Responsibilities: Reach out to potential participants and ask them to register for the Arohan project. Explain the benefits of participating in the project and answer any questions they may have. Track and report on your sales progress and provide regular updates to the Arohan project team. Qualifications: Strong sales and communication sk...
I'm looking for someone to enter a large list of questions into chatgpt and send me the responses. Something like data entry. The worker will need to have their own chatgpt account and a way to get the information to me
Please Sign Up or Login to see details.
The DB is less than 10MB on the linux server. Somehow, the mysql DB folder is ridiculously large. After checking file sizes, these two files are hug...After checking file sizes, these two files are huge: 64G project_db/ 7.3G project_db/ This link tells something. It seems to be used in fulltext search! Possible to get rid of this kind of space eater completely from the whole db? Or at least, need to minimize its space usage. We need you to help us figure out what the issue is and provide a solution to fix it. You can access our DB using anydesk or teamviwer. The work has to be done remotely.
I need someone to type into Latex the exercises in Goldstein et al.'s calculus textbook. There are 86 such exercises. Many involve mathematical formulas, which need to appear as shown in the textbook. The textbook is included as an attachment here to allow you to provide me with a quotation. To be clear, the job involves the sub...the job involves the submission of 86 individual Latex files corresponding to the 86 sets of exercises in the textbook: - Prerequisite skills diagnostic test - Exercise 0.1 - Exercise 0.2 - Exercise 0.3 - Exercise 0.4 - Exercise 0.5 - Exercise 0.6 - Chapter 0 review exercise - Exercise 1.1 ... ... - Chapter 12 review exercise IMPORTANT: There is no need to provide solutions to the exercise questions . All I require is someone to type the exercises ...
WELCOME , I AM LOOKING FOR NEW FREELANCER FROM INDIA , I NEED SOMEONE WHO CAN EXPERT IN MS WORD WHICH MAKE ASSIGNMENT MAKE AND CONVERTED INTO PDF FILES. WHICH MAX 6000 PAGE WRITE AND CONVERTED TO PDF FILES. THANKS .
Front end development (mobile and web) has already been completed for this website where one e-book in pdf format will be sold. Now need someone to complete project by developing checkout page (already designed but needs to be developed)/ecommerce/payment capabilities, ensuring the smooth delivery of e-book upon payment, security, speed, seo, 404 page development, banner design , imprint buyer's name on the book....send email to customer after purchase and other actions....other back end stuff. Will share exhaustive list of requirements and link later. A creative, resourceful, solution-focused, quality-focused, and business minded developer sought. PHP and HTML expertise and creative/graphic design skills needed (for minimal ...
We are establishing our new business that coaches clients f...establishing our new business that coaches clients from being employees to starting their own business and realised that our logo ideas were too similar to another company we know. We would like to establish our own brand and need a distinct logo that would represent what we stand for. Our motto is Motivate and Transform through alignment There are 4 of us so we would like to keep an element of 4 in the design . We are also extremely partial to water ripples as seen in a video background on website. The only word to be used in the logo is MATTA Colours to be used are (Blue shades) #3369b2 #4193c3 Please feel free to ask any questions you may need for clarity
Looking for an artist who can work with our logo concept and make it come alive and professional. Not just quickly convert it to a generic font. The logo will be used on our website, email, and letterhead. It is the precursor to building our website. Ask as many questions as you need
Generate 2 creative texts per post (2 post in total, 4 copy's to deliver) to publish on s...the division of the texts would be understanding that copy out is the text that goes in the publication and copy in the text that goes in the design . Design the 2 posts for social media using the "Copy in" text. About the brand Call Center Services Considerations for the texts. The texts of the copy out must have emojis. You can use AI, as long as the text is reviewed and customized by you. Material for graphic design More material will be provided after the project is accepted, containing guidelines to consider before creating the texts. • Identity Brand Manual. • Logo. • Fonts. • Guide Examples. Material for texts More info...
Scope of work: - 150 Multiple choice Questions and answers course development - Students will take the course in a private setting - Interface development required for practice
i need help building a basic store just to get running im looking to hire a web designer who can help me mold an appealing website for conversions. i have a logo i want to work off of so please message me with questions if this project intrests you
Hi, I want an application (web, iOS and android with these goals: - Allow the patients to be able to search for doctors and specialists and book an appointment with them. - Allow the doctors and specialists to accept physical and online appointments and provide online consultations. - Allow administrators to manage app and have stats. For more specification We wanted a backend the is the more generic possible. Meaning, a backend that will handle all the services and which we can plug 2 BFFs (backend for frontend): one for mobile app and one for the web app. See this attached file for more details. more details : Multiple sign-up and login options ( google or apple account, phone number, emails) Read Terms and ...
i was reading a paper so i have few questions about that it use caluclus , and newtonian physics
Choose the Right Example. Select a project you've worked on recently, and not one from several years ago. ... Be Specific. ... Explain Your Role Clearly. ... Mistakes You Should Avoid. ... Sample Answers .
We're looking for a PHP developer to join our team and help us build web applications from the ground up. The ideal candidate should have experience with Laravel, MySQL, and RESTful API development. Here are a few technical questions to test your knowledge, please answer them otherwise you candidacy will not be considered! Can you explain the difference between GET and POST requests in HTTP? How would you handle errors in a PHP application? Can you explain the difference between abstract classes and interfaces in PHP?
Hello, I need a php-script to copy all questions , answers , categories, users and dates of questions / answers from a question2answer-database to a wordpress-database. Every question should become a wordpress-post. Every answer should become a comment to the post. All usernames need to be copied to the new wordpress-database (no passowords, mailadresses need to be copied). All dates (date of question/answer) need to be copied. I don't need any statistics (number of views, votes, ...). Who can do that for me? We are talking about 10000 posts to be copied. I need a php-script for that OR you can do the job on my server. I can give you access to both mysql-databases. But first I need to know, if you are able to do the job.
Hi all, Please help me with making the best digital shop frame mock-up! I have attached the images that I would like to ...I have attached the images that I would like to use. But please feel free to use them up to your discretion for this contest. Important info: - between 5 and 10 slides - Display the pictures as in a frame - Size: 3000 x 2250 for the first page. Others could be the same size or 2000 x 2000 - I want to be able to edit the files (preferably in Canva) Files labelled 1,2,3,4,5 & Molly's are my own that I want to use in the mockup. The screenshots attached are an example for you to go by! Please don't exactly copy these examples but make my design stand out next to these. Chat me if you have any further questions I will try ...
...to meet with Aqua10 (an energy drink company) and show them some nice product videos. If they like it we will get a contract. So I will not choose one winner for this contest. Instead, all the video that the client likes will get 100 USD for this. I had a story board but I want to see how creative you can get if I just give you the material and let you edit with full creative freedom. So check out aqua10 () and the footage provided feel free to do whatever you want. You can make it with or without text. I will update here later what text you can include. For now, you can check out their company and use their bullet points as text in your videos. Please let me know if you have any questions ! Here is the link to the material: https://drive
I require an iOS native app, developed in Xcode using SwiftKit or UIKit and provided as an Xcode project. The app is a language learning app for iOS to learn the Italian language. It will have 50 lessons/chapters that must be studied in sequence, beginning with lesson 1. When opened the app must show a welcome screen and the list of 50 lessons on it's home screen, with indicators of whether each lesson has been completed. Each lesson has sentences in Italian, which must be displayed on screen in sequence, and which when touched on the screen must be highlighted and read aloud using the Speech Synthesis framework in Italian. The user must be able to scroll up and down within the lesson and touch any sentence to have it read aloud as ofte...
Hi talented coders, hope you like abit of a challenge (or maybe it isn't) We have some 3D assets in GLTF which we want to create the environment in to create a walkthrough and simulate ecommerce transactions. If you're keen and are available kindly indicate interest. Feel free to ask questions . Budget listed is indicative.
I need someone who can do similar to: ChatGPT Chrome Extension. i.e. connecting OpenAI to internet and summarize answers to a prompt like that of ChatGPT Chrome Extension. basically, I need someone who can do like chatgpt but combining with live internet.
Emu8086, Assembly language and make it like report with Sc
See attached below about assignment
We're looking for a versatile graphic designer/illustrator to help with social media banner designs. We're a group of designers who work on a variety of projects including graphic and web design . We have a fast turnaround time and ask that designs be completed within 24 hours of assignment . We're looking for a designer who can take on part-time with ongoing work as soon as this week. Applicant should have proficient knowledge in: - Photoshop *must be highly proficient - Illustrator More information will be provided upon review. Thank you!
good morning, I'm searching for a team of developers which can help be to develop a desktop app that includes the following: user log in, payments possibility, a ranking system for users with most points, possibility to upload videos, once the video is watched the user gains points, possibility to send notification to all users about an assignment available to comlplete. Connected to a news server in order to have it on the website. I already have a design and a wireframe.
ProgrammingOneOnOne
- _100+ C Programs
- _100+ Java Programs
- DSA Tutorials
- Digital Communication
- IoT Tutorials
- Human values Tutorials
Compiler Design Interview Questions and Answers
A compiler is a program that reads a program written in one language ( source language ) and translates it into another language ( target language ). mostly the compiler is used to generate machine code . and to generate the machine code we have different phases to complete. and to study these phases we have a compiler design subject.
In the technical field, we always have to deal with machine code . so it's very important to read about the compiler design process for any technical field. so here we are including basic to advanced compiler design interview questions and answers .
In analyzing the compilation of the PL/I program, the term "Machine independent optimization" is associated with
- the recognition of basic syntactic construction through reductions.
- recognition of basic elements and the creation of uniform symbols.
- creation of more optimal matrix
- use of the macro processor to produce more optimal assembly code
Answer - (3) creation of the more optimal matrix
In analyzing the compilation of the PL/I program the description "resolving symbolic address (labels) and generating machine language" is associated with
- assembly and output
- code generation
- storage assignment
- syntax analysis
Answer - (1) assembly and output
In analyzing the compilation of the PL/I program the description "creation of more optimal matrix" is associated with
- machine-independent optimization
Answer - (4) machine-independent optimization
Which one is not true about syntax and semantic parts of a computer language
- The syntax is generally checked by the programmer.
- Semantics is the responsibility of the programmer.
- Semantics is checked mechanically by a computer.
- Both (b) and (c) above
Answer - (4) Both (b) and (c) above
Left factoring is the process of factoring out the common
- prefixed of alternates
- suffixes of alternates
- predictive parsing
- none of the above
Answer - (4) None of the above
In analyzing the compilation of the PL/I program, the term "lexical analysis" is associated with
- the recognition of basic syntactic constructs through reductions.
- creation of a more optimal matrix.
- use of the macro processors to produce more optimal assembly code.
Answer - (2) recognition of basic elements and the creation of uniform symbols
Operator-precedence parsing method is a parsing method. Which of the following statement is false about it?
It is a bottom-up parsing method It must contain e-production. It doesn't contain two adjacent nonterminal symbols.
- 1 and 3 only
Answer - (2) 2 only
If conversion from one type to another type is done automatically by the compiler then, it is called
- implicit conversion
- both (a) and (b)
Answer - (3) both (a) and (b)
The term "environment" in programming language semantics is said as
- a function that maps a name to value held there
- a function that maps a name to a storage location
- the function that maps a storage location to the value held there
Answer - (2) a function that maps a name to a storage location
A nonrelocatable program is one which
- cannot be made to execute in any area of storage other than the one designated for it at the time of its coding or translation.
- consists of a program and relevant information for its relocation
- can itself perform the relocation of its address sensitive portions.
- all of the above.
Answer - (1) cannot be made to execute in any area of storage other than the one designated for it at the time of its coding or translation
A self relocating program is one which
- consists of a program and relevant information for its relocation.
- can itself perform the relocation of its address-sensitive portions
- all of the above
Answer - (3) can itself perform the relocation of its address-sensitive portions
- is the same as a loader
- is require to create a load module
- user source code as input
- is always used before programs are executed
Answer - (1) is the same as a loader
The translator is best described as
- application software
- a system software
- a hardware component
Answer - (2) a system software
Resolution is externally defined symbols is performed by
Answer - (1) Linker
Which of the following derivations does a top-down parser use while parsing an an input string? The input is assumed to be scanned in left to right order.
- Leftmost derivation
- Leftmost derivation traced out in reverse
- Rightmost derivation
- Rightmost derivation traced out in reverse
Answer - (1) Left most derivation
A simple two-pass assembler does which of the following in the first pass?
It allocates space for the literal. It computes the total length of the program. It builds the symbol table for the symbols and their values. It generates code for all the loads and stores register instructions.
Answer - (3) 1, 2 and 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
- syntax-directed translation can be written for intermediate code generation.
- it enhances the portability of the front end of the compiler.
- it is not possible to generate code for real machines directly from high-level language programs.
Answer - (2) syntax-directed translation can be written for intermediate code generation
A compiler is
- A program that places programs into memory and prepares them for execution
- a program that automates the translation of assembly language into machine language
- a program that accepts a program written in a high-level language and produces an object program
- a program that appears to execute a source program as if it were machine language
Answer - (3) a program that accepts a program written in a high-level language and produces an object program
A loader is
- a program that places programs into memory and prepares them for execution
Answer - (1) a program that places programs into memory and prepares them for execution
Which of the following are language processors?
- interpreters
- all of these
Answer - (1) assembler
Note - More questions and answers will be added from time to time.

Posted by: YASH PAL
You may like these posts, post a comment.
- basic programming
- c programming
- compiler design
- computer network
- computer organization
- computer science
- cs subjects
- data structures
- developer guide
- digital logic
- internet of things
- Interview questions answers
- java project
- Machine Learning
- operating systems
- software engineering
- Tips&Tricks
Subscribe if you like my work and i will help you to learn new things
Menu footer widget.

IMAGES
VIDEO
COMMENTS
100 top compiler design important questions and answers pdf - Home » COMPILER DESIGN Questions » 100 - Studocu On Studocu you find all the lecture notes, summaries and study guides you need to pass your exams with better grades. DismissTry Ask an Expert Ask an Expert Sign inRegister Sign inRegister Home Ask an ExpertNew My Library Discovery
Compiler Design Interview Questions With Sample Answers Here are sample answers to some questions interviewers may ask during your interview: 1. What are the two parts of compilation? Explain both. This is a basic question the interviewer may ask you. This question may help them determine your basic understanding of how compilers work.
View Answer 2. Which of the following is a stage of compiler design? a) Semantic analysis b) Intermediate code generator c) Code generator d) All of the mentioned View Answer 3. What is the use of a symbol table in compiler design? a) Finding name's scope b) Type checking c) Keeping all of the names of all entities in one place
Principles of Compiler Design - Code Generation : Important Short Questions and Answers: Compiler Design - Code Generation 1. What are basic blocks? A sequence of consecutive statements which may be entered only at the beginning and when entered are executed in sequence without halt or possibility of branch , are called basic blocks. 2.
COMPILER DESIGN VIVA Questions :- 1. What is a compiler? A compiler is a program that reads a program written in one language -the source language and translates it into an equivalent program in another language-the target language. The compiler reports to its user the presence of errors in the source program. 2.
Compiler Design Exam Questions Answers. Code Optimization. Compilers. Symbol Table. Parsers. Assembler. Context free grammar. Syntax tree and context flow graph. External subroutines.
Short Answer Questions 1. Define Compiler and what are the phases of compiler. ... Assignments statements. (ii) Case statements. 7. Write three codes for x:=A[y, z] with detail explanation. ... What is stack allocation in compiler design. Long Answer Questions 1. Explain principle sources of optimization in details.
Set -1. Construct a recursive descent parser for the following grammar. Obtain leftmost and rightmost derivation for the string a+b*a+b. Explain about LL (1) grammars in detail. Explain the role of parser in the compiler design. Construct predictive parsing table for the following grammar.
Important Short Questions and Answers: Syntax Analysis and Run-Time Environments UNIT III : INTERMEDIATE CODE GENERATION Intermediate Languages Declarations Assignment Statements Boolean Expressions Case Statements Backpatching Procedure Calls Important Short Questions and Answers: Principles of Compiler Design - Intermediate Code Generation
300+ TOP Compiler Design Interview Questions and Answer COMPILER DESIGN Interview Questions :- 1. What is a compiler? A compiler is a program that reads a program written in one language -the source language and translates it into an equivalent program in another language-the target language.
All groups and messages ... ...
Some of the main concepts that constitute the Compiler Design questions are Lexical Analysis, Code Generation and Optimization, Parsing and more. Candidates are also advised to refer to the collection of Compiler Design GATE Questions and Answers that we have compiled here in this article below.
All the frequently asked compiler design interview questions are obtained from technical experts and google sources. Rating: 4.9. Compiler design is the process of converting a high-level programming language into computer-executable machine code. The process of converting source code written in one programming language (the source language ...
Compiler Design Assignments Assignment 1 Provide regular expressions to characterize the following lexical items: Identifiers: alphanumeric strings starting with an alphabet, and can also contain special character '_' where you allow it is up to you, but state your decisions in your documentation. Examples x, ab_2y, c2 etc.
Here we are going to see a list of important Compiler Design questions and answers for competitive exams and interviews. These frequently asked Software Testing multiple-choice Questions for job interviews and placement tests also helpful for college and competitive exams and also improve your knowledge.
Recent questions and answers in Compiler Design 1 vote. 2 answers. 1. ... The minimum number of total variables required to convert the above code segment to static single assignment form is _____. strawberry-jam answered in Compiler Design Jan 28. by strawberry-jam. 22.3k views. gatecse-2016-set1; compiler-design;
Search for jobs related to Compiler design assignment questions and answers or hire on the world's largest freelancing marketplace with 20m+ jobs. It's free to sign up and bid on jobs.
Compiler Design Interview Questions and Answers. YASH PAL March 19, 2022. A compiler is a program that reads a program written in one language ( source language) and translates it into another language ( target language ). mostly the compiler is used to generate machine code. and to generate the machine code we have different phases to complete ...
Recent Compiler Design Questions and Answers We found 2 assignments. Please note: We do not publish private questions here. . Need help with your homework assignments? Ask your questions for instant help or use the search box to find the answers by the Tutlance tutoring community. magnify Search Clear Search 39 Views 2 Answers
2. a. Problem Definition: To calcula …. ECE 102 Assignment #6 Mowing rate Write and test a program that takes the length and width of a rectangular yard and the length and width of a rectangular house situated at the center of that yard, and calculate and display the amount of time it will take to mow the grass in hours, given that the grass ...