Computer Science - Language Processors MCQs Part 2

1. Convert the CHARI h#000F, s assembly language instructions into hexadecimal machine language:

A.
0111EF
B.
9001E6
C.
DA000F
D.
40

 Answer Option C

2. The table created by lexical analysis to describe all literals used in the source program, is:

A.
Terminal table
B.
Literal table
C.
Identifier table
D.
Reductions

 Answer Option B

3. Advantage(s) of using assembly language rather than machine language is/are:

A.
It is mnemonic and easy to read
B.
Addresses any symbolic, not absolute
C.
Introduction of data to program is easier
D.
All of the above

 Answer Option D

4. The action of parsing the source program into the proper syntactic classes is known as

A.
syntax analysis
B.
lexical analysis
C.
interpretation analysis
D.
general syntax analysis

 Answer Option B

5. The task(s) of the Lexial analysis phase is/are:

A.
to parse the source program into the basic elements or tokens of the language
B.
to build a literal table and an identifier table
C.
to build a uniform symbol table
D.
All of the above

 Answer Option D

6. A relocate program form is the one which

A. 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
B. consists of a program and relevant information for its relocation
C. can itself perform the relocation of its address-sensitive portions
D. All of the above

 Answer Option B

7. In which way(s) can a macro processor for assembly language be implemented?

A. independent two-pass processor
B. independent one-pass processor
C. processor incorporated into pass of a standard two-pass assembler
D. All of the above

 Answer Option D

8. A system program that combines the separately compiled modules of a program into a form suitable for execution

A. assembler
B. linking loader
C. cross compiler
D. load and go

 Answer Option B

9. A compiler is

A. a program that places programs into memory and prepares them for execution
B. a program that automate the translation of assembly language into machine language
C. program that accepts a program written in a high level language and produces an object program
D. is a program that appears to execute a source program as if it were machine language

 Answer Option C

10. In an absolute loading scheme, which loader function is accomplished by loader?

A. Reallocation
B. Allocation
C. Linking
D. Loading

 Answer Option D

11. The Process Manager has to keep track of:

A. the status of each program
B. the priority of each program
C. the information management support to a programmer using the system
D. both (a) and (b)

 Answer Option D

12. Convert the 080D4E machine language instructions into assembly language, assuming that they were not generated by pseudo-ops:

A. ASRA
B. LOADA h#OD4E, i
C. STOREA h#014B, d
D. ADDA h#01FE, i

 Answer Option B

13. Which of the following system program forgoes the production of object code to generate absolute machine code and load it into the physical main storage location from which it will be executed immediately upon completion of the assembly?

A. two pass assembler
B. load-and-go assembler
C. macroprocessor
D. compiler

 Answer Option B

14. Convert the 48 machine language instructions into assembly language, assuming that they were not generated by pseudo-ops:

A. ASRA
B. LOADA h#OD4E, i
C. STOREA h#014B, d
D. ADDA h#01FE, i

 Answer Option A

15. The macro processor must perform

A. recognize macro definitions and macro calls
B. save the macro definitions
C. expand macro calls and substitute arguments
D. All of the above

 Answer Option D

16. In an absolute loading scheme, which loader function is accomplished by assembler

A. Reallocation
B. Allocation
C. Linking
D. Loading

 Answer Option A

17. Convert the .BYTE h#F8 assembly language pseudo-ops into hexadecimal machine language:

A. 0111EF
B. 03 16
C. F8
D. 42 65 61 72

 Answer Option C

18. In what module, multiple instances of execution will yield the same result even if one instancy has not terminated before the next one has begun?

A. non-reusable module
B. serially reusable
C. reenterable module
D. recursive module

 Answer Option C

19. A loader is

A. a program that places programs into memory and prepares them for execution
B. a program that automate the translation of assembly language into machine language
C. is a program that appears to execute a source program as if it were machine language
D. program that accepts a program written in a high level language and produces an object program

 Answer Option A

20. Bug means

A. A logical error in a program
B. A difficult syntax error in a program
C. Documenting programs using an efficient documentation tool
D. All of the above

 Answer Option A

21. A base register table

A. is a term that refers to the control programs of an operating system
B. is used to remember which of the general-purpose registers are currently available as base registers, and what base addresses they contain
C. allows multiple programs to reside in separate areas of core at the same time
D. allows the programmer to write base registers and displacements explicitly in the source program

 Answer Option B

22. A sequence of instructions, in a computer language, to get the desired result, is known as

A. Algorithm
B. Decision Table
C. Program
D. All of the above

 Answer Option C

23. The function(s) of the Storage Assignment is/are:

A. to assign storage to all variables referenced in the source program
B. to assign storage to all temporary locations that are necessary for intermediate results
C. to assign storage to literals, and to ensure that the storage is allocated and appropriate locations are initialized
D. All of the above

 Answer Option D

24. An algorithm is best described as

A. A computer language
B. A step by step procedure for solving a problem
C. A branch of mathematics
D. All of the above

 Answer Option B

25. Indicate whether the statement LDA B is a statement, in

A. Machine language
B. Assembly language
C. High level language
D. All of the above

 Answer Option B

26. In analyzing the compilation of PL/I program, the term "Machine independent optimization" is associated with

A. recognition of basic syntactic constructs through reductions
B. recognition of basic elements and creation of uniform symbols
C. creation of more optional matrix
D. use of macro processor to produce more optimal assembly code

 Answer Option C

27. The function(s) of the Syntax phase is/ are:

A. to recognize the major constructs of the language and to call the appropriate action routines that will generate the intermediate form or matrix for these constructs
B. to build a literal table and an identifier table
C. to build a uniform symbol table
D. to parse the source program into the basic elements or tokens of the language

 Answer Option A

28. Which table is a permanent databases that has an entry for each terminal symbol?

A. Terminal table
B. Literal table
C. Identifier table
D. Reductions

 Answer Option A

29. Indicate which of the following is not true about an interpreter?

A. Interpreter generates an object program from the source program
B. Interpreter is a kind of translator
C. Interpreter analyses each source statement every time it is to be executed
D. All of the above

 Answer Option A

30. When a computer is first turned on or restarted, a special type of absolute loader, called a ______ is executed

A. loader
B. linker
C. bootstrap loader
D. None of the above

 Answer Option C

31. Loaders that allow for program relocation are called

A. relocating loaders
B. relative loaders
C. both (a) and (b)
D. None of the above

 Answer Option C

6. A relocate program form is the one which

A. 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
B. consists of a program and relevant information for its relocation
C. can itself perform the relocation of its address-sensitive portions
D. All of the above

 Answer Option B

7. In which way(s) can a macro processor for assembly language be implemented?

A. independent two-pass processor
B. independent one-pass processor
C. processor incorporated into pass of a standard two-pass assembler
D. All of the above

 Answer Option D

8. A system program that combines the separately compiled modules of a program into a form suitable for execution

A. assembler
B. linking loader
C. cross compiler
D. load and go

 Answer Option B

9. A compiler is

A. a program that places programs into memory and prepares them for execution
B. a program that automate the translation of assembly language into machine language
C. program that accepts a program written in a high level language and produces an object program
D. is a program that appears to execute a source program as if it were machine language

 Answer Option C

10. In an absolute loading scheme, which loader function is accomplished by loader?

A. Reallocation
B. Allocation
C. Linking
D. Loading

 Answer Option D

Comments

Most Popular

Remove Unicode Zero Width Space PHP

PhpStorm, return value is expected to be 'A', 'object' returned

Laravel file upload returns forbidden 403, file permission is 700 not 755