CS606 - MIdterm Solved MCQs With References.docx

Verified academic study resource for CS606 (Compiler Design & Construction) under the Computer Science at Virtual University of Pakistan. This DOC document (Midterm Solved Past Paper & Revision File) 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
DOC
Type
Midterm
Coverage
Mid-Term Exam Scope (Lectures 1 to 22)
Tags
MCQ, SOLVED, 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 Solved MCQs With References.docx for free?

You can preview and download "CS606 - MIdterm Solved MCQs With References.docx" (CS606 DOC, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs606-midterm-solved-mcqs-with-references-docx) 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 instruction
Solved MCQS
From Midterm Papers

Dec 19,2013

MC100401285
Moaaz.pk@gmail.com          Mc100401285@gmail.com
PSMD01


MIDTERM EXAMINATION
Fall 2012
CS602- compiler instruction



Question # 1 (Total Marks: 1) Select correct option:
LR parsers can handle ________________ grammars.
 Left-recursive (Page 63)
 file-recursive
 End-recursive
 Start-recursive

Question # 2 (Total Marks: 1) Select correct option:
_____ convert the relocatable machine code into absolute machine code by linking library and relocatable object files.
Assembler
Loader/link-editor
Compiler
Preprocessor

Question # 3 (Total Marks: 1) Select correct option:
Follow of C is _____________ .
g, h, i, $
g, h, $
h, i, $
h, g, $

Question # 4 (Total Marks: 1) Select correct option:
Consider the grammar A --> B C D
B --> h B | epsilon
C --> C g | g | C h | i
D --> A B | epsilon
Follow of B is _____________ .

h
g, h, i, $
g, i
g

Question # 5 (Total Marks: 1) Select correct option:
An important component of semantic analysis is __________________ .

code checking
type checking (Page 33)
flush checking
None of the given

Question # 6 (Total Marks: 1) Select correct option:
In PASCAL ___________ represent the inequality test.

:=
=
<>
None of the given

Question # 7 (Total Marks: 1) Select correct option:
Lexical Analyzer generator ________________ is written in Java.

Flex
Jlex (Page 26)
Complex
None of given

Question # 8 (Total Marks: 1) Select correct option:
____________avoid hardware stalls and interlocks.

Register allocation
Instruction scheduling (Page 121)
Instruction selection
None of given

Question # 9 (Total Marks: 1) Select correct option:
Consider the following grammar,
A --> B C D
B --> h B | epsilon
C --> C g | g | C h | i
D --> A B | epsilon
First of A is _______________ .
h, g, i
g
h
None of the given

Question # 10 (Total Marks: 1) Select correct option:
Recursive ____________ parsing is done for LL(1) grammar.
Descent (Page 47)
Ascent
Forward
Backward

Question # 1 (Total Marks: 1) Select correct option:
One of the core tasks of compiler is to generate fast and compact executable code.
True
False

Question # 11 (Total Marks: 1) Select correct option:
Left factoring of a grammar is done to save the parser from back tracking.
True
False

Question # 12 (Total Marks: 1) Select correct option:
Responsibility of ______________ is to produce fast and compact code.
Instruction selection (Page 9)
Register allocation
Instruction scheduling
None of given

Question # 13 (Total Marks: 1) Select correct option:
________________ algorithm is used in DFA minimization.
James’s
Robert’s
Hopcroft’s (Page 25)
None of given

Question # 14 (Total Marks: 1) Select correct option:
Compilers are sometimes classified as.
Single pass
Multi pass
Load and go
All of the given click here for detail

Question # 15 (Total Marks: 1) Select correct option:
In multi pass compiler during the first pass it gathers information
about ___________________ .
Declaration click here for detail
Bindings
Static information
None of the given

Question # 16 (Total Marks: 1) Select correct option:
Flex is an automated tool that is used to get the minimized DFA (scanner).
True
False (Page 26)

Question # 17 (Total Marks: 1) Select correct option:
In compilation process Hierarchical analysis is also called
Parsing
Syntax analysis
Both Parsing and Syntax analysis click here 4 detail
None of given

 Question # 18 (Total Marks: 1) Select correct option:
 For each language to make LL(1) grammar, we take two steps, 1st is removing left recurrence and 2nd is applying left factoring in sequence.

 True
 False

Question # 19 (Total Marks: 1) Select correct option:
_____________is evaluated to yield a value.
 Command
 Expression
 Declaration
 Declaration and Command

Question # 20 (Total Marks: 1) Select correct option:
Optimal registers allocation is an NP-hard problem.
 True
 False

MIDTERM EXAMINATION
Fall 2012
CS602- compiler instruction

Question # 1 (Total Marks: 1) Select correct option:
Parser takes tokens from scanner and tries to generate _______________ .
Binary Search tree
Parse tree
Syntax trace
None of the given

Question # 2 (Total Marks: 1) Select correct option:
Front end of two pass compiler takes_________________ as input.
Source code (Page 5)
Intermediate Representation (IR)
Machine Code
None of  the Given

Question # 3 (Total Marks: 1) Select correct option:
In in we construct one _______________ for each group of states from the initial DFA.

State (Page 25)
NFA
PDA
None of given

Question # 4 (Total Marks: 1) Select correct option:
In Three-pass compiler _____________ is used for code improvement or optimization.

 Front End
Middle End (Page 10)
Back End
Both Front end and Back end

Question # 5 (Total Marks: 1) Select correct option:
________________ of a two-pass compiler is consists of Instruction selection, Register allocation and Instruction scheduling.

Back end (Page 10)
Front end
Start
None of given

Question # 6 (Total Marks: 1) Select correct option:
NFA is easy to implement as compared to DFA.
 True
False (Page 19)

Question # 7 (Total Marks: 1) Select correct option:
We can get an LL(1) grammar by ________________ .
 Removing left recurrence
Applying left factoring
Removing left recurrence and Applying left factoring
None of the given

Question # 8 (Total Marks: 1) Select correct option:
Parser always gives a tree like structure as output
 True
False

Question # 9 (Total Marks: 1) Select correct option:
In Back End module of compiler, optimal register allocation uses_______________ .

 O(log n)
O(n log n)
N P-Complete (Page 10)
None of the given



CS606 – Midterm Solved Quizzes (Quiz No.1 & 2)

Question # 1 of 10 (Total Marks: 1) Select correct option:
Lexer and scanner are two different phases of compiler
Select correct option:
True
False

Question # 2 of 10 (Total Marks: 1) Select correct option:
In Flex specification file different sections are separated by ___________________ .

%% (Page 26)
&&
##
\\

 Question # 3 of 10 (Total Marks: 1) Select correct option:

More CS606 files

All CS606 files · Midterm Prep 2026 · MCQs Bank