adplus-dvertising
101. In two pass assembler the symbol table is used to store:
a. Label and value
b. Only value
c. Mnemonic
d. Memory Location
Discuss
Answer: (d).Memory Location

102. Non modifiable procedures are called
a. Serially useable procedures
b. Concurrent procedures
c. Reentrant procedures
d. Topdown procedures
Discuss
Answer: (c).Reentrant procedures

103. Not an assembler directive
a. XCHG
b. ASSUME
c. SHORT
d. DB
Discuss
Answer: (a).XCHG

104. In a compiler, the task of scanning the source code, to recognize and classify various elements is known as.
a. Code Optimization
b. Syntactic Analysis
c. Lexical Analysis
d. Semantic Analysis
Discuss
Answer: (c).Lexical Analysis

105. An example of a compiler-compiler is:
a. JAVA
b. LEX
c. YACC
d. MATLAB
Discuss
Answer: (c).YACC

106. Consider the following program fragment in assembly language. What is the value of ax and cx registers after the completion of the doloop?
    mov ax, 0h
    mov cx, 0A h
doloop:
    dec ax
    loop doloop
a. ax = FFF5 h and cx = 0 h
b. ax = FFF6 h and cx = 0 h
c. ax = FFF7 h and cx = 0A h
d. ax = FFF5 h and cx = 0A h
Discuss
Answer: (b).ax = FFF6 h and cx = 0 h

107. Consider the following assembly program segment. The contents of the destination register ax (in hexadecimal) and the status of Carry Flag (CF) after the execution of above instructions are:
stc
mov al, 11010110b
mov cl, 2
rcl al, 3
rol al, 4
shr al, cl
mul cl
a. ax = 003CH; CF = 0
b. ax = 001EH; CF = 0
c. ax = 007BH; CF = 1
d. ax = 00B7H; CF = 1
Discuss
Answer: (a).ax = 003CH; CF = 0

108. Match the description of several parts of a classic optimizing compiler in List - I, with the names of those parts in List - II:

List - I
(a) A part of a compiler that is responsible for recognizing syntax.
(b) A part of a compiler that takes as input a stream of characters and produces as output a stream of words along with their associated syntactic categories.
(c) A part of a compiler that understand the meanings of variable names and other symbols and checks that they are used in ways consistent with their definitions.
(d) An IR-to-IR transformer that tries to improve the IR program in some way (Intermediate representation).

List - II
(i) Optimizer
(ii) Semantic Analysis
(iii) Parser
(iv) Scanner

Code:
(a) (b) (c) (d)
a. (iii) (iv) (i) (ii)
b. (iv) (iii) (ii) (i)
c. (ii) (iv) (i) (iii)
d. (ii) (iv) (iii) (i)
Discuss
Answer: (a).(iii) (iv) (i) (ii)

Page 11 of 11