CS606-MidTerm-ByArslanArshadZain.pdf

Verified academic study resource for CS606 (Compiler Design & Construction) under the Computer Science at Virtual University of Pakistan. This PDF document (Midterm Solved Past Paper & Revision File compiled by Zainab Arshad) covers Mid-Term Exam Scope (Lectures 1 to 22) spanning approximately 240 pages across 4 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS606 – Compiler Design & Construction
Faculty
Computer Science
Format
PDF
Type
Midterm
Coverage
Mid-Term Exam Scope (Lectures 1 to 22)
Compiled by
Zainab Arshad
Tags
MIDTERM

Focus on core definitions and repeated MCQs from Lectures 1–22. Remember that scoring in the First Half builds your safety buffer toward the mandatory 20% Two-Half passing rule in CS606.

What this file covers — CS606 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)

Frequently asked questions

Where can I download CS606-MidTerm-ByArslanArshadZain.pdf for free?

You can preview and download "CS606-MidTerm-ByArslanArshadZain.pdf" (CS606 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs606-midterm-byarslanarshadzain-pdf) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS606 file?

This document covers Mid-Term Exam Scope (Lectures 1 to 22) across 4 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.

What is the passing criteria for CS606 under the VU 20% Two-Half Rule?

Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.

Are CS606 solved past papers and handouts verified for 2026 exams?

Yes. All CS606 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.

Inside this file

                                                CS606- Compiler Construction
                                                                                                FEB
                                                 MidTerm Papers Solved                         21,2016
                                      MCQS with Reference (1 to 22 lectures) by
                                                    Arslan Arshad (Zain)
     0300-2462284                  http://lmshelp.blogspot.com/ Arslan.arshad01@gmail.com      AKMP01

            MidTerm Papers Solved MCQS with Reference (1 to 22 lectures)

1. Typical compilation means programs written in high-level languages to low-level ________.

    o Object code                    PG # 06
    o Byted code
    o Unicode
    o Object Code and byte code

2. In compilation process, Hierarchical analysis is also called ____________.

    o Parsing

    o Syntax              Click Here For More Detail

    o Parsing and Syntax analysis

    o None of given

3. IR (Intermediate Representation) stores the value of its operand in _____________.

 o Registers                     PG # 10 Click Here For More Detail

 o Memory

 o Hard disk

 o None Of given

4. A lexeme is a sequence of characters in the source program that is matched by the pattern for a __________.

 o Linker

 o Token                           Click Here for More Detail

 o Control flow

 o None of given

5. Parsers take ___________ as Input from lexical analyzer.

 o Linker

 o Token

 o Instructions

 o None of the given

6. What kind of abstract machine can recognize strings in a regular set?

 o DFA

 o NFA

 o PDA

 o None of the given

7. In multi pass compiler, during the first pass it gathers information about ____________.

 o Declaration

 o Bindings

 o Static information

 o None of the given

8. In DFA minimization, we construct one ____________ for each group of states from the initial DFA.

 o State                 PG # 30

 o NFA

 o PDA

 o None of given

9. ______(Lexical Analyzer generator), is written in Java

 o Flex

 o Jlex                Click here for More Detail PG # 31

 o Complex

 o None of given

     JLex is a lexical analyzer generator, written for Java, in Java.

10. In Flex specification file, different sections are separated by _______________.

 o %%                              Click Here For More Detail      PG # 31

 o &&

 o ##

 o None of given

11. Recursive ________ parsing is done for LL(I) grammar.

 o Decent                  Click Here For More Detail

 o Ascent

 o Forward

 o None of the given

12. Alternative of the backtrack in parser is Look ahead symbol in _________.

 o Input

 o Output

 o Input and Output

 o None of the given

13. Parser takes tokens from scanner and tries to generate ___________.

 o Binary Search tree

 o Parse tree

 o Binary Search tree and Parse tree

 o None of the given

14. In predictive parsing table, the rows represents __________.

 o Terminals

 o Both non-terminal and terminals

 o Non-terminals                PG # 62

 o None of the given

15. In LL(I) parsing algorithm,________ contains a sequence of grammar symbols.

 o Stack               PG # 62

 o Link List

 o Array

 o None of the given

16. Consider the grammar

                    A B C D

                    B h B | £

                    C C g | g | C h | i

                      D AB | £
   First of A is __________.

 o h, g, i
 o g
 o h
 o None of the given

17. Consider the grammar

                    A B C D

                    B h B | £

                    C C g | g | C h | i

                      D AB | £
   First of C is ___________.

 o g, i
 o g
 o h, i
 o None of the given

 18. Bottom-up parsing uses only __________ kinds of actions.

   o Two                       PG # 71

   o Three

   o Four

   o Five

Bottom-up parsing uses only two kinds of actions: 1. Shift, 2. Reduce

Shift: Move | one place to the right
∎ Shifts a terminal to the left string

Reduce : Apply an inverse production at the right end of the left string

 19. The shift action _________ a terminal on the stack.

   o Pushes                    PG # 73

   o Pops

   o Both push and pops

   o None of the given

 20. Reduce ________ action zero or more symbols from the stack

   o Pushes

   o Pops                    PG # 73

   o Both push and pops

   o None of the given

 21. In compilers, linear analysis is also called _______.

   o Lexical analysis

   o Scanning

   o Lexical analysis and scanning              Click Here For More Detail

   o None of the given

 22. Back End of two-pass compiler uses _______ algorithm.

   o O(n)
   o O(n log n)
   o NP Complete
   o None of the Given

 23. The Back End of a compiler consist of _________.

   o Instruction selection         Click Here For More Detail

   o Register allocation

   o Instruction scheduling

   o All of the given

 24. In Back End module of compiler, optimal register allocation uses ___________.

   o O(log n)

   o O(n log n)

   o NP-Complete

   o None of the given

25.___________is a regular expression for the set of all strings over the alphabet {a} that has an even number of a' s.

   o (aa)*

   o (aa)*a

   o aa*a

   o a*(aa)

26. _________algorithm is used in DFA minimization.

o James's

o Robert’s

o Hopcroft’s                    PG # 25

o None of given

27. ___________ is an important component of semantic analysis.

o Code checking

o Type checking                 PG # 39

o Flush checking

o None of the given

28. Consider the grammar

                   A B C D

                   B h B | £

                   C C g | g | C h | i

 First of B is____________.

o h, i
o h, £
o g
o None of the given

29. Consider the grammar

                    A B C D

                    B h B | £

                    C C g | g | C h | i

                     DAB|£

    First of D is____________.

o h, g
o h
o h, g , i, £
o None of the given

30. __________ Parsers never shifts into an error state.

   o LS

   o LT

   o LR

   o LP

More CS606 files

All CS606 files · Midterm Prep 2026 · MCQs Bank