Language Processors(Computer Science ) Questions and Answers
Question 1. Which of the following functions is/ are performed by the loader?
Allocate space in memory for the programs and resolve symbolic references between object decks
Physically place the machine instructions and data into memory
Adjust all address dependent locations, such as address constants, to correspond to the allocated space
All of the above
Explanation:-
Answer: Option D. -> All of the above
Question 2. Convert the 11014B machine language instructions into assembly language, assuming that they were not generated by pseudo-ops:
ASRA
LOADA h#OD4E, i
STOREA h#014B, d
ADDA h#01FE, i
Explanation:-
Answer: Option C. -> STOREA h#014B, d
Question 3. The advantage(s) of incorporating the macro processor into pass 1 is/ are:
many functions do not have to be implemented twice
Functions are combined and it is not necessary to create intermediate files as output from the macro processor and input to the assembler
more flexibility is available to the programmer in which he/she may use all the features of the assembler in conjunction with macros
All of the above
Explanation:-
Answer: Option D. -> All of the above
Question 4. In which addressing mode, the effective address of the operand is generated by adding a constant value to the contents of register?
absolute mode
indirect mode
immediate mode
index mode
Explanation:-
Answer: Option D. -> index mode
Question 5. A self-relocating 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
Explanation:-
Answer: Option C. -> can itself perform the relocation of its address-sensitive portions
Question 6. If special forms are needed for printing the output, the programmer specifies these forms through
JCL
IPL
Utility programs
Load modules
Explanation:-
Answer: Option A. -> JCL
Question 7. Which of the following systems software does the job of merging the records from two flies into one?
Documentation system
Utility program
Networking software
Security software
Explanation:-
Answer: Option B. -> Utility program
Question 8. Job Control Language (JCL) statements are Used to
Read the input from the slow-speed card reader to the high-speed magnetic disk
Specify, to the operating system, the beginning and end of a job in a batch
Allocate the CPU to a job
All of the above
Explanation:-
Answer: Option B. -> Specify, to the operating system, the beginning and end of a job in a batch
Question 9. In analyzing the compilation of PL/I program, the term "Syntax analysis" is associated with
recognition of basic syntactic constructs through reductions
recognition of basic elements and creation of uniform symbols
creation of more optional matrix
use of macro processor to produce more optimal assembly code
Explanation:-
Answer: Option A. -> recognition of basic syntactic constructs through reductions
Question 10. Terminal Table
a permanent table which lists all key words and special symbols of the language in symbolic form
a permanent table of decision rules in the form of patterns for matching with the uniform symbol table to discover syntactic structure
consists of a full or partial list of the tokens as they appear in the program. Created by Lexical analysis and used for syntax analysis and interpretation
contains all constants in the program
Explanation:-
Answer: Option A. -> a permanent table which lists all key words and special symbols of the language in symbolic form