A compiler for a high level language that runs on one machine and produces code for a different machine is called:
1. Optimizing
2.One pass compiler
3.Cross compiler
4. Multipass compiler
A single instruction in an assembly language program contains:
1.one micro operation
2.one macro operation
3.one instruction to be completed in a single pulse
4.one machine code instruction
A Top-down Parse generates:
1.Right-most derivation
2.Right-most derivation in reverse
3.Left-most derivation
4.Left-most derivation in reverse
An operating system is:
1.Collection of hardware components
2.Collection of input-output devices
3.Collection of software routines
4.All of the above
If you want to execute more than one program at a time, the systems software that are used must be capable of:
1.word processing
2.virtual memory
3.compiling
4.multitasking
In a two pass compiler, during the first pass:
1.user defined address symbols are correlated with their binary equivalent
2.the syntax of the statement is checked and mistakes, if any, are listed
3.object program is generated
4.semantic of the source program is elucidated
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)
1.(iii) (iv) (i) (ii)
2.(iv) (iii) (ii) (i)
3. (ii) (iv) (i) (iii)
4.(ii) (iv) (iii) (i)
Not an assembler directive
1.XCHG
2.ASSUME
3.SHORT
4. DB
Symbol table can be used for:
1.Checking type compatibility
2.Suppressing duplication of error message
3.Storage allocation
4.All of these above
The ‘K’ in LR (K) cannot be:
1.0
2.1
3.2
4.None of These
Which of the following are Assembler Directives? (i) EQU (ii) ORIGIN (iii) START (iv) END
1. (ii), (iii) and (iv)
2.(i), (iii) and (iv)
3.(iii) and (iv)
4.(i), (ii), (iii) and (iv)
YACC builds up ................. parsing table.
1. LALR
2.LR
3.SLR
4.LLR
A general macro processor is an in built function of:
1.Loader
2.Linker
3.Editor
4.Assembler
A parse tree is an annotated parse tree if:
1.it shows attribute values at each node.
2. there are no inherited attributes.
3.it has synthesized nodes as terminal nodes.
4.every non-terminal nodes is an inherited attribute.
A permanent database of a general model of compiler is................
1.Identifier table
2.Page map table
3.Literal table
4.Terminal table
Absolute loader demands that the programmer needs to know the:
1.start address of the available main memory
2.total size of the program
3.actual address of the data location
4.absolute values of the operands used
An assembly program contains:
1.imperative and declarative statements
2.imperative and assembler directives
3.imperative and declarative statements as well as assembler directives
4.declarative statements and assembler directives
An example of a compiler-compiler is:
1.JAVA
2.LEX
3.YACC
4.MATLAB
Any syntactic construct that can be described by a regular expression can also be described by
1.Context sensitive grammar
2.Non context free grammar
3.Context free grammar
4.None of the above
Assembler program is:
1. dependent on the operating system
2.dependent on the compiler
3.dependent on the hardware
4.independent of the hardware
At the end of parsing,
1.tokens are identified.
2.the syntactic groups are identified.
3.set of instructions are identified.
4.machine instructions are identified.
Code optimization is responsibility of:
1.Application programmer
2.System programmer
3.Operating system
4.All of the above
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
1.ax = 003CH; CF = 0
2.ax = 001EH; CF = 0
3.ax = 007BH; CF = 1
4.ax = 00B7H; CF = 1
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
1.ax = FFF5 h and cx = 0 h
2.ax = FFF6 h and cx = 0 h
3.ax = FFF7 h and cx = 0A h
4.ax = FFF5 h and cx = 0A h
Dead-code elimination in machine code optimization refers to:
1.removal of all labels.
2.removal of values that never get used. c.
3. removal of function which are not involved.
4.removal of a module after its use.
How many states can a process be in?
1.2
2.3
3.4
4.5
In a compiler, the task of scanning the source code, to recognize and classify various elements is known as.
1.Code Optimization
2.Syntactic Analysis
3.Lexical Analysis
4.Semantic Analysis
In an absolute loading scheme, which loader function is accomplished by programmer?
1.Allocation
2.Linking
3.Reallocation
4.Both (a) and (b)
In the context of compiler design, “reduction in strength” refers to:
1.code optimization obtained by the use of cheaper machine instructions
2.reduction in accuracy of the output
3.reduction in the range of values of input variables
4.reduction in efficiency of the program
In two pass assembler the symbol table is used to store:
1.Label and value
2.Only value
3.Mnemonic
4.Memory Location
Linking
1.cannot be performed before relocation
2.cannot be performed after relocation
3.can be performed both before and after relocation
4.is not required if relocation is performed
Loading operating system from secondary memory to primary memory is called...............
1.Compiling
2.Booting
3.Refreshing
4.Reassembling
Non modifiable procedures are called:
1.Serially usable procedure
2.Concurrent procedure
3.Re-entrant procedure
4.Top down procedure
Peep-hole optimization is a form of:
1.loop optimization
2.local optimization
3.constant folding
4.data flow analysis
Tasks done in parsing are:
1.Check the validity of a source string
2.Determine the syntactic structure of a source string
3.Both a and b
4.None of these
The action of passing the source program into the proper syntactic class is known as:
1.Syntax analysis
2.Lexical analysis
3.Interpretation analysis
4.Uniform symbol generation
The dynamic binding occurs during the:
1.Compile time
2.Run time
3.Linking time
4.Pre-processing time
The parsing technique that avoids back tracking is:
1.Top-down parsing
2.Recursive-descent parsing
3.Predictive
4. Syntax tree
The principle of Locality of reference justifies the use of:
1.Virtual memory
2.Interrupts
3.Cache memory
4.Secondary memory
Top-down parsers are predictive parsers, because:
1. next tokens are predicted
2.length of the parse tree is predicted before hand
3.lowest node in the parse tree is predicted
4.next lower level of the parse tree is predicted
When a language has the capability to produce new data types, it is said to be:
1.extensible
2.encapsulated
3.overloaded
4.None of the above
Which activity is included in the first pass of two pass assemblers?
1.Build the symbol table
2.Construct the intermediate code
3.Separate mnemonic opcode and operand fields
4.All of the above
Which activity is not included in the first pass of two pass assembler?
1.build the symbol table
2.construct the intermediate code
3.separate mnemonic opcode and operand field
4.none of these
Which activity is not included in the first pass of two pass assemblers ?
1.Build the symbol table
2.Construct the machine code
3.Separate mnemonic opcode and operand fields
4.None of these
Which activity is not included in the first pass of two pass assemblers?
1.Build the symbol table
2.Construct the intermediate code
3.Separate mnemonic opcode and operand fields
4.None of the above
Which of the following is not collision Resolution Technique?
1.Hash addressing
2.Chaining
3.Indexing
4.None of these
Which of the following is the most general phase - structured grammar ?
1.Regular
2.Context – Sensitive
3.Context free
4.None of these
Which of the following is the most general phase-structured grammar ?
1.Regular
2.Context-sensitive
3.Context free
4.Syntax tree
Which of the statements related to Compilers is wrong ?
1.Lexical analysis is breaking the input into tokens
2.Syntax analysis is for parsing the phrase
3.Syntax analysis is for analyzing the semantic
4.None of these
Which statement is wrong ?
1.If linked origin ≠ translated origin, relocation must be performed by the linker
2.If load ≠ linked origin, the loader must perform relocation
3.A linker always perform relocation, whereas some loaders do not
4.None of These