You are on page 1of 66

MCQS ON UNIT 1 SYSTEM PROGRAMMING

1.Which of the following is not an operating system?


A)Linux
B)Oracle
C)DOS
D)Windows
Answer:B
2.What is the maximum length of the filename in DOS?
A)4
B)5
C)8
D)12
Answer: D

3.When was the first operating system developed?

A)1948

B)1949
C)1950
D)1951
Answer:C

4.When were MS windows operating systems proposed?

A)1994
B)1990
C)1992
D)1985
Answer: D

5.Which of the following is the extension of Notepad?


A).txt
B).xls
C).ppt
D).bmp
Answer : A
6. If a number of instructions are repeating through the main program, then to reduce the length of
the program, __________ is used.
A) procedure
B) subroutine
C) macro
D) none of the mentioned
Answer: C
7. A macro within a macro is called
A) macro-within-macro
B) nested macro
C) macro-in-macro
D) none of the mentioned
Answer: B
8.The end of a macro can be represented by the directive.
A) END
B) ENDS
C) ENDM
D) ENDD
Answer: C
9. Which of the following is a stage of compiler design?
A) Semantic analysis
B) Intermediate code generator
C) Code generator
D) All of the mentioned
Answer: D
10.Which of the following is known as a compiler for a high-level language that runs on one
machine and produces code for a different machine?
A) Cross compiler
B) Multipass compiler
C) Optimizing compiler
D) One pass compiler
Answer: A
11.A part of computer system that consist of data on computer instructions
: A) Software

B) Chip
C) Hardware
D) DOS
Answer : A
12.Special purpose software are :
A) Application software
B) System software
C) Utility software
D) None of the above
Answer : A
13.In computer operating system and utility programs are examples of
: A) System software

B) Device drivers
C) Application software
D) Customized software
Answer : A
14.Bottom up parsing involves :
A) Shift reduces
B) Operator check
C) Both (a) and (b)
D) None of these
Answer : C
15.Parsing is also known as :
A) Lexical analysis
B) Syntax analysis
C) Semantic analysis
D) Code generation
Answer : B
16.Software is defined as ___________
A) set of programs, documentation & configuration of data
B) set of programs
C) documentation and configuration of data
D)None of the mentioned
Answer: A
17.____________ is a software development activity that is not a part of software
processes. A) Validation
B) Specification
C) Development
D) Dependence
Answer: D
18.Attributes of good software is ____________
A) Development
B) Maintainability & functionality
C) Functionality
D) Maintainability
Answer: B
19.What does SDLC stands for?
A) System Design Life Cycle
B) Software Design Life Cycle
C) Software Development Life Cycle
D) System Development Life cycle
Answer: C
20._________ is not a fundamental activity for software processes in software
development. A) Evolution
B) Design and implementation
C) Validation
D) Verification
Answer: D
21. ____________ is a software development activity that is not a part of software
processes. A) Validation

B) Specification
C) Development
D) Dependence
Answer: D
22.Software patch is defined as ______________
A) Daily or routine Fix
B) Required or Critical Fix
C) Emergency Fix
D) None of the mentioned
Answer: C
23…………….. allows selection of the relevant information necessary for the data
warehouse. A)The Top-Down View

B)Data Warehouse View


C)Data source View
D)Business Query View
Answer: A
24……………… uses electronic means to transfer funds directly from one account to another
rather than by cheque or cash?
A)M-Banking
B)E-Banking
C)O-Banking
D)C-Banking
Answer: B
25.Which of the following is not a lossy compression technique ?
A) JPEG
B) MPEG
C) FFT
D) Arithmetic coding
Answer: D
26. Languages that is developed for business applications is known as
A) Pascal
B)Cobol
C) C
D) C++
Answer: B
27. Computer can’t boot if it does not have
A) Compiler
B)Linker
C) Interpreter
D)Operating system
Answer: D
28. Initial work on the internet was done in operating system known
as A)Unix

B)Linux
C) Mac OS
D) DOS
Answer: A
29. Types of computer language translator are
A) Compilers
B)Interpreters
C)Assemblers
D) All of these
Answer:D
30. A computer translator is best described as
A) Application software
B)System software
C)Hardware
D)Window
Answer:B

31. A machine language instruction format consists


of A) operand field

B) operation code field


C) operation code field and operand field
D) none of the mentioned
Answer : C

32. The instruction format 'register to register' has a length


of A) 2 bytes

B) 1 byte
C) 3 bytes
D) 4 bytes
Answer : A

33.In a machine instruction format , S-bit is the


A) status bit
B) sign bit
C) sign extension bit
D) none of the mentioned
Answer : C

34.Operation code field is present in


A) programming language instruction
B) Assembly language instruction
C) Machine language instruction
D) None of the mentioned
Answer : C

35. The instructions which after execution transfer control to the next instruction in the sequence
are called
A) Sequential control flow instructions
B) Control transfer instructions
C) Sequential control flow and control transfer instuctions
D) None of the mentioned
Answer : A
36.Which of the following might be used to convert high level language instructions into
machine language?
A)System software
B)Applications software
C)An operating environment
D)An interpreter
Answer: D
37.The advantage(s) inherent to using high language is/are:
A)Fewer people, less management and shorter transition in learning time.
B)Improved debugging capability, and superior documentation
C)A greater degree of machine independence
D)All of the above
Answer: D
38.Operation code field is present in:
A)Programming language instruction
B)Assembly language instruction
C)Machine language instruction
D)None of the above
Answer: C
39.The length of the one-byte machine language instruction is
A)2 bytes
B)1 bytes
C)3 bytes
D)4 bytes
Answer: B
40.The instruction format ‘register to register’ has a lengthof
A)2 bytes
B)1 bytes
C)3 bytes
D)4 bytes
Answer: A

41. The linker ?


A)Is same as the loader
B)Is required to create a load module
C)Is always used before programs are executed
D)None of above Answer & Sol

Answer: B
42. 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: B
43. Loading process can be divided into two separate programs, to solve some problems. The first is
binder the other is ?
A)Linkage editor
B)Module Loader
C)Relocator
D)None of these
Answer & So
Answer: B

44. Load address for the first word of the program is called
A)Linker address origin
B)Load address origin
C)Phase library
D)Absolute library
Answer & Solution Dis
Answer: B

45. A linker program


A)Places the program in the memory for the purpose of execution.
B)Relocates the program to execute from the specific memory area allocated to
it. C)Links the program with other programs needed for its execution.
D)Interfaces the program with the entities generating its input data.
Answer & Solution Discu
Answer: C .
46.Assembly language uses
A)Hex code
B)Binary code
C)Mnemonics
D)ASSII code
Answer: B
47.The advantage(s) inherent to using high level languages is/are:
A)Fewer people, less management and shorter transition in learning time
B)Improved debugging capability and superior documentation
C)A greater degree of machine independence
D)All of the above
Answer: D

48.Operation code field is present in:


A) Programming languages instruction
B) Assembly languages instruction
C) Machine languages instruction
D) None of the mentioned
Answer: C

49.The instruction format ‘register to register’ has a length


of A)2 bytes

B)1 bytes
C)3 bytes
D)4 bytes
Answer: A

50.The instruction “JUMP” belongs to


A)Sequential control flow instructions
B) Control transfer instructions
C) Branch instructions
D) Control transfer & branch instructions
Answer: D
51.Which of the following is not a type of assembler?
A)One Pass
B)Two Pass
C)Three Pass
D)Load and go
Answer: C
52.In a two pass assembler the pseudo code EQU is to be evaluated during
? A)Pass 1

B)Pass 2
C)Not evaluated by the assembler
D) None of the above
Answer: A
53.An assembler is ______
A)Programming language dependent
B)Syntax dependent
C)Machine dependent
D)Data dependent
Answer:C
54.Translator for low level programming language were termed as___
A)Assembler
B)Compiler
C)Linker
D)Loader
Answer: A
55.In a two Pass assembler the object code generation is done during the
? A)Second Pass

B)First Pass
C)Zeroeth Pass
D)Not done by assembler
Answer:A
56.What is computer architecture?
A) set of categories and methods that specify the functioning, organisation, and implementation
of computer systems
B) set of principles and methods that specify the functioning, organisation, and implementation
of computer systems
C) set of functions and methods that specify the functioning, organisation, and implementation
of computer systems
D) None of the mentioned
Answer: B

57. What is computer organization?


A) structure and behaviour of a computer system as observed by the user
B) structure of a computer system as observed by the developer
C) structure and behaviour of a computer system as observed by the
developer D)All of the mentioned
Answer: A

58. Which of the following is a type of computer architecture?


A) Microarchitecture
B) Harvard Architecture
C) Von-Neumann Architecture
D) All of the mentioned
Answer: D

59. Which of the following is a type of architecture used in the computers


nowadays? A) Microarchitecture
B) Harvard Architecture
C) Von-Neumann Architecture
D) System Design
Answer: C

60. Which of the following is the subcategories of computer


architecture? A) Microarchitecture
B) Instruction set architecture
C) Systems design
D) All of the mentioned
Answer: A
61.which of the following is not the component of formal
system? A)A finite alphabet of symbol
B)A syntax
C)A set of axioms and rules
D)A set of operations
Answer :D
62.formal systems are used for________.
A)Language specification
B)Syntax-directed compiler
C)Complexity structure studies
D)All of above
Answer:D
63.A_______defines which strings of symbols are in language of our formal
system. A)symbol
B)string
C)theorem
D)axioms
Answer :A
64.formal system are used to define syntax of programming
language. A)True
B)False
Answer: A
65.Which of the following is not example of formal system?
A)Set theory
B)Number theory
C)Boolean algebra
D)Post systems
Answer: B
MCQ ON ASSEMBLER

GROUP -2 ( 15 -28)

1) what is the function of USING pseudo – op ?

a) load the base register

b) specify the base register and its contents

c)end the program

d)gives the value of location to the literal first

2) Out of following which is not a

pseudo-op ? a)END b)USING

c)START d)none of above

3) the function of BALR pseudo-op is :

a) load the register with the next address and branch to the
address in the second field.

b) specify the base register and its contents

c)end the program

d)gives the value of location to the literal first


4) what is the function of START pseudo-op ?

a) to start the macro definition

b) to start program

c)all of the above

d)none of the above

5) what is the function of END pseudo-op ?

a) to end program

b) to end the macro definition

c)all of the above

d)none of the above

6) BR pseudo –op :

a) gives the value of location to the literal first

b) load the register with the next address and branch to the
address in the second field.

c) specify the base register and its contents

d) branch to the location where address in general register 14.


7) which of the following pseudo-op gives the value of location to
the literal first ?

a) LTORG b)BR

c)DROP d)DS

8) DROP is a pseudo-op which :

a)tells the assembler to drop the storage

b)tells the assembler to drop the constants

c) tells the assembler if the operand is not available

d) tells the assembler to locate literal

9) the function of DC pseudo-op is

a) to define constants

b) to drop constants

c) to define constants

d) to drop combination

10) pseudo –op specify the :

a) the operation on assembler

b)the operation on macro-processor


c)the operation on compiler

d)the operation on loader

11) a block of memory can be reserved for data using defined storage.

a) true

b) false

12) out of which allows the programmer to define variable :

a) DC

b) DS

c) LTORG

d) EQU

13) absolute relocation in which :

a)location counter does not change if the program is moved in core.

b) location counter change if the program is moved in core .

c)none of the above

d) all of the above

14) relative relocation in which :


a) location counter does not change if the program is moved in core.

b) location counter change if the program is moved in core .

c)none of the above

d) all of the above

15) what is an assembler?

a) the program which accepts an assembly language and


produes machine code.

b) the program which accepts high-level language and


produce assembly language code

c) all of the above

d) none of the above

16) what is forward referencing ?

a) referencing of the entity secceeds its definition

b) referencing of the entity precedes its definition

c) referencing of the pseudo-op secceeds its definition

d) referencing of pseudo-op entity precedes its definition

17) what is backward referencing ?


a) referencing of the entity secceeds its definition

b) referencing of the entity precedes its definition

c) referencing of the pseudo-op secceeds its definition

d) referencing of pseudo-op entity precedes its definition

18) Forward referencing and backward referencing both are used


in assembly level language .

a) true

b) false

19) what is

machine-op ? a)CPU

instruction b)assembler

instruction

c) complete instruction

d) loader instruction

20) which is not a machine-op ?

a) AC b) ST

c)BALR d) END
21) Assembler is a machine dependent because

of : a)macro definition table (MDT)

b)pseudo operation table (pot)

c) argument list array (ALA)

d)mnemonics operation table(MOT)

22) the machine operation table (MOT), that indicates the


symbolic mnemonics , for each instruction and its length are :

a) 2 byte

b)4 byte

c)6 byte

d)all of the above

23) the symbol table prepared by :

a) pass 1

b)pass 2

c)both a & b

d)none of the above

24) machine opcode table(MOT) is a fixed length table .


a)TRUE

b)FALSE

25) which is incorrect from following statements:

a) A pseudo operation table (POT) indicates symbolic mnuemonics


and action to be taken for each machine –op in pass1.

b) A pseudo operation table (POT) indicates symbolic mnuemonics


and action to be taken for each machine –op in pass2.

c) A pseudo operation table (POT) indicates symbolic mnuemonics


and action to be taken for each pseudo–op in pass1.

d) A pseudo operation table (POT) indicates symbolic mnuemonics


and action to be taken for each pseudo–op in pass2.

26) The statement that tells the computer to get a value from an
input device and store it in a memory location.

a) read

b) write

c) READ

d) WRITE
27) are identified by their addresses, we give them
names (field names / variable names) using words.

a) Memory variables

b) Memory Locations

c) Memory Addresses

d) Data variables

28) what is the purpose of pass1 of assembler ?

a) to define symbols and literals.

b)generate object code

c) none of the above

d) all of the above

29) In pass1 of an assembler :

a) determine length of machine instruction

b) keep track a location counter

c) both a & b

d) none of the above

30) a location counter is used to


a) to store each label

b) to keep track of each instructions location

c) to indicate symbolic mnemonics

d) all of the above

31) the symbol table is used to

a) to store each label and its corresponding value

b) to keep track of each instructions location

c) to indicate symbolic mnemonics

d) all of the above

32) the literal table is used to

a) to store each label

b) to keep track of each instructions location

c) to store each literal encountered

d) all of the above

33) the DS and DC pseudo-op cannot affect both the location


counter and the definition of symbols in pass1.
a) true

b)false

34) In a two pass assembler the pseudo code EQU is to


be evaluated during?
a) Pass1.
b) Pass2.
c) Not evaluated by the assembler.
d) None of the above

35) A single two pass assembler does which of the following in


the first pass
a) It allocates space for the literals.
b) It computes the total length of the program.
c) It builds the symbol table for the symbol and their values.
d) All of the above.

36) what is the output of pass1 of assembler ?

a) during pass1 the assembler traverse the assembly language


code to generate the sections that comprise the machine language
code.
b) all the symbol and literals

c)object code , messages

d) all of the above

37) which of the following is not a type of

assembler ? a)one pass

b)two pass

c)three pass

d)load and go

38) Pass 1 assigns

a) the address to all statements in the program

b) saves the values assigned to all labels for use in pass2.

c)perform some processing of assembler directives

d) all of the above

39) what is the purpose of pass2 of assembler ?

a) to define symbols and literals.

b)generate object code

c) none of the above


d) all of the above

40) Which instruction allocate space and assigns an intial value?

a) EQU

b) DS

c) BALR

d) DC

41) The recurrence of the numerical values or constants in a


program code is reduced by

a) Assume

b) Local

c) Label

d) EQU

42) In a two-pass assembler, the task of the Pass II is to

a) separate the symbol, mnemonic opcode and operand fields.

b) build the symbol table.

c) construct intermediate code.

d) synthesize the target program.


43) what is the function of an assembler ?

a) evaluate the mnemonic in the operation field to produce its


machine code.

b)evaluate the sub-fields

c) find the value of each symbol , process literals and assign address

d) all of the above.

44) functions of pass 2 of an assembler :

a) looks up value of symbols and generate instructions

b) generate data and process pseudo-op

c) both a & b

d) only a

45) What is closed subroutine?

a) Is one whose code is inserted into the main program.

b) Stored outside the main routine and controls transfer to


the subroutine.

c) Define process that has side effects.

d) All of the above.


46) What is the use of open subroutine?

a) To create a channel between the caller and graphic input


device driver.

b)To remove a channel created by the open subroutine call.

c)Both A and B

d) none of the above

47) Procedures that modify themselves are called impure procedure .

a) true

b) false

48) A pure procedure modify itself.

a) true

b) false

49) Which of the following databases use in

pass1? a)Location counter

b)Pseudo-op table(POT)

c)Symbol Table(ST)

d)All of above
50) Which of the following databases use in

pass1? a)Location counter

b)Pseudo-op table(POT)

c)Symbol Table(ST)

d)All of above

51) Which of following datbases used by pass2 Assembler?

a) Base table (BT)

b) Machine-op Table

c)Pseudo-op Table (POT)

d) All of the above

52) The alternate way of writing the instruction, ADD #5,R1 is

a) ADD [5],[R1];
b) ADDI 5,R1;
c) ADDIME 5,[R1];
d) There is no other way

53) For the given program what is the location counter of „A‟
in the given program:

JOHN START
0 0 USING *,15

0 4 L 1,FIVE

4 4 A 1,FOUR

8 4 ST 1,TEMP

12 4 FOUR DC F „5‟

16 4 FIVE DC F „5‟

20 4 TEMP DS F‟2‟

24 0 END

a)0 b)8 c)4 d)12

54) For the program given below what is the value of


symbol FIVE:

JOHN START

USING *,15

L 1,FIVE

A 1,FOUR

ST 1,TEMP
FOUR DC F
„5‟

FIVE DC F
„5‟
TEMP DS F‟2‟

END

a)16 b)20 c)0 d)12

55) For the given program what is the value of literals = F’25’ :

0 0 MYPRO START

0 2 BEGIN BALR 15,0

2 0 USING BEGIN+2,15

2 2 SR 4,4

4 4 L 3,=F ‘10’

8 4 LOOP L 3,DATA(4)

12 4 A 2, =F ‘25’
16 4 ST 2,DATA(4)
20 4 A 4, =F ‘4’
24
4 BCT 3,LOOP
28 2 BR 14
36 12 LTORG

48 DATA DC F’1,3,3,4,5,9
24

72 0 END

a)40 b)32 c)44 d)36

56) For the given program what is the value of symbol “BEGIN”:

0 0 MYPRO START
BALR 15,0
USIN
0 2 BEGIN G BEGIN+2,15

2 0

2 2 SR 4,4

4 4 L 3,=F „10‟

8 4 LOOP L 3,DATA(4)
12 4 A 2, =F „25‟

16 4 ST 2,DATA(4)

20 4 A 4, =F „4‟
24 4 BCT 3,LOOP
28 2
BR 14

36 12 LTORG

48 24 DATA DC F‟1,3,3,4,5,9
72 0 END

a)8 b)0 c)44 d)36


1. If a number of instructions are repeating through the main program, then to reduce the length of
the program is used.

a) procedure
b) subroutine
c) macro
d) none of the mentioned

Answer: c

2. The process of assigning a label or macroname to the string is called

a) initialising macro
b) initialising string macro
c) defining a string macro
d) defining a macro

Answer: d

3. A macro can be defined as

a) beginning of a program
b) end of a program
c) after initialisation of program
d) anywhere in a program

Answer: d

4. A macro can be used as

a) in data segment
b) to represent directives
c) to represent statements.
d) all of the mentioned

Answer: d
5. The end of a macro can be represented by the directive.

a) END
b) ENDS
c) ENDM
d) ENDD

Answer: c

6. Inserting the statements and instructions represented by macro, directly at the place of the
macroname , in the program, is known as

a) calling a macro
b) inserting a macro
c) initializing a macro
d) none of the mentioned

Answer: a

7. The time required for execution of a macro is that of the procedure.

a) greater than
b) less than
c) equal to
d) none of the

Answer:

Answer :b

8. Which of the following statements is incorrect?

a) complete code of instruction string is inserted at each place, wherever the macroname appears
b) macro requires less time of execution than that of procedure
c) macro uses stack memory
d) macroname can be anything except registers and mnemonics

9.Non-modifiable procedures are


called?
a. concurrent procedures
b. serially usable procedures
c. reentrant procedures
d. topdown procedures
10.The translator which perform macro expansion is
called
a.. Macro processor
b. Macro pre-processor
c. Micro prprocessor
d.assembler

11. A macro definition consists-


a. A macro prototype
statement
b. One or more model statements
c. Macro pre-processor statements
d. All of the above

12. A macro is

a. small program inside a program


b. set of special instructions
c. a unit of specification for program generation through expansion
d. None of the above

13. A statement declare the name of macro.

a. macro prototype
b. macro definition
c. macro identification
d. None of the above
14. During macro expansion each statement is
replaced by
a. the original program
b. the sequence of assembly statement
c by specific symbols
e. None of the above

15. Each macro statement is marked with the sign preceded it.

a. +
b. @
c. ~
d. $
16. The flow control during macro

expansion is a combination

b. chronological
c. cindexable
d sequential

17. A model statement contains call for another macro is called as

a. referential macro call


b nested macro call
c. inbuilt macro call
d. inherited macro call

18. Expansion time variables are

used

a. for expansion of micro-calls

b only during expansion of macro calls


c. After expansion of micro
calls d Any one of the above.

19 . Macroprocessor is an inbuilt function of?

a. Loader
b. Editor
c. Linker
d. Assembler

20.A macro within a macro is


called
a macro within macro
b. nested macro
c macro in macro
e. none of the mentioned
21. The beginning of the macros can be represented as:
A. START
B. BEGIN   
C. MACRO
D. None of the mentioned   
Answer: C. MACRO

23. Macro-processors are


A. Hardware
B. Compilers
C. Registers
D. None of the above
Answer: B. Compilers

24. Macro processor is an inbuilt function of-


A. Assembler
B. Loader
C. Linker   
D. Editor
Answer: A. Assembler
25. In which way a macro processor for assembly language can be implemented?
A. Processor incorporated into pass 1 of a standard two pass assembler
B. Independent one-pass processor
C. Independent two-pass processor
D. All of these
Answer: D. All of these

26. Nested macro call are expended using the


A. FIFO (first in first out)
B. LIFO (last in first out)
C. FILO (first in last out)
D. None of the above.
Answer : B. LIFO (last in first out)

30. is used to indicate the next line of the text to be used during macro expansion.
a. MDTP
b. ALA
c. MNTC
d. all of the above.
Answer : a. MDTP

31. A model statement contain call for another macro is called as


a. referential macro call
b. nested macro call
c. inbuilt macro call
d.inherited macro call
Answer : b. nested macro call

32. The process of assigning a label or macroname to the string is called


a. initializing macro
b. initializing string macro
c. defining string macro
d. defining a macro
Answer : d. defining a macro

33. A processor –
a. is a sequence of instructions
b. is the devise where information is stored
c. is a devise that performs a sequence of operations specified by instructions in memory
d. none of the above
Answer : C . is a devise that performs a sequence of operations specified by instructions in memory

34. The conditional expansion facility of macro processor is provided to -


a. To expand certain model statements depending upon the value of a condition during the execution of the
expanded code .
b. Test a program during the execution of the expanded program
c. Both a) and b)
d. all of the above
Answer : c. Both a) and b)

35. It is used to store the body of the definations.


a. MNT
b. MDTC
c. MBT
d. ALA
Answer : c. MBT

36.what are x and y in the following macro definition ? macro Add x,y load y mul x store y end macro.
a. variables
b. Identifiers
c. formal parameters
d. Actual parameters
Answer : C .formal parame

37.The advantage(s) of incorporating the macro processor into pass 1 is/ are:

a. many functions do not have to be implemented twice

b. more flexibility is available to the programmer in which he/she may use all the features of the e

c. Functions are combined and it is not necessary to create intermediate files as output from the macro
processor and input to the assembler

d. All of the above

Answer: (d).
All of the above

38. Which of the following macros can put a macro assembler into an infinite loop ?

a. MACRO M1, XIF EQ, X if X = 0 then....M1 X + 1ENDCIF NE, X : IF X ≠ 0


then......WORD X : address (X) is stored here ENDCENDM
b. MACRO M2, XIF EQ, XM2 XENDCIF NE, XWORD X + 1ENDCENDM

c. both (a) and (b)

d. none of these

Answer: (b).
MACRO M2, XIF EQ, XM2 XENDCIF NE, XWORD X + 1ENDCENDM

39. Nested Macro calls are expanded using the


A. FIFO rule (First in first out)
B. LIFO (Last in First out)
C. FILO rule (First in last out)   
D. None of the above
Answer: B. LIFO (Last in First out)

40. is used to indicate the next available entry in the MDT.


a. MDTC
b. MNT
c. MNTC
d. ALA

Answer : a. MDTC
UNIT 4: LOADERS

1.A system program that brings together separately compiled modules of a


program into a form language that is suitable for execution.
a. Assembler
b. Linking loader
c. Cross compiler
d. None of the mentioned
ANS. B) Linking Loader
2.A system program that combines the separately compiled modules of a
program into a form suitable for execution?
a. Assembler
b. Compiler
c. Linking Loader
d. Interpreter
ANS.C Linking Loader
3.Which of the following system software always resides in the main
memory?
a. Text Editor
b. Assembler
c. Linker
d. Loader
ANS. D. Loader
4.A loader is
a. A program that places programs into memory and prepares
them for execution.
b. A program that automates the translation of assembly language
into machine language
c. A 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 if it were
machine language
ANS. A) A program that places programs into memory and prepares
them for execution.
5.Which of the following module does not incorporate initialization
of values changed by the modules?
a. Re-enterable module
b. Non reusable module
c. Serially reusable module
d. All of these
ANS. B Non reusable module
6.A non-relocatable program is the one which.
a. Can itself perform the relocation of its address sensitive
portions
b. Consists of a program and relevant information for its
relocation
c. 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
d. All of these
ANS. C 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
7.In an absolute loading schema, which loader function is
accomplished by loader?
a. Linking
b. Loading
c. Allocation
d. Reallocation
ANS. B Loading
8.A linker is given object module for a set of programs that were
compiled separately. What information need not to be included in an
object module.
a. Object code
b. Relocation bits
c. Absolute addresses of internal symbols.
d. Names and locations of all external symbols denied in the
object module
ANS. C Absolute addresses of internal symbols.
9.A linker reads four modules whose length are 200, 800, 600 and
500 words, respectively, if they are loader in that order, what are the
relocation constants?
a. 200, 700, 1300, 2100
b. 200, 500, 600, 800
c. 0, 200, 1000, 160
d. 0, 200, 500, 600
ANS B 200, 500, 600, 800
10.In an absolute loading schema, which loader function is
accomplished by programmer?
a. Linking
b. Allocation
c. Both (a) and (b)
d. Reallocation
Answer: C. Both (a) and (b)
11.A system program that setup an executable program in main
memory ready for execution is
a. Loader
b. Linker
c. Assembler
d. Load and go
Answer: A. Loader
12.In a resident-OS computer, which of the following system must
reside in the main memory under all situations?
a. Assembler
b. Linker
c. Loader
d. Compiler
ANS. C Loader
13.Loading process can be divided into two separate programs, to solve
some problems. The first is binder and the other is __________
a. Linkage editor
b. Module Loader
c. Relocator
d. None of these

Answer: (b)Module Loader.

14.Load address for the first word of the program is called

a. Linker address origin


b. Load address origin
c. Phase library
d. Absolute library

Answer: (b)Load address origin

15.Static memory allocation is typically performed during

a. compilation
b. Execution
c. Loading
d. Linking

Answer: (a)compilation

16.Which of the following are the principles tasks for the


linker?
I. Resolve external references among separately compiled
program units.
II. Translate assembly language to machine code.
III. Relocate code and data relative to the beginning of the
program.
Iv. Enforce access-control restrictions on system libraries
a) I and II
b) I and III
c) II and III
d) I and IV
ANS: b) I and III
17.Relocation bits used by relocating loader are specified by
a) Relocating loader itself
b) Linker
c) Assembler
d) Macro Processor
ANS: b) Linker
18.Which of the following is the first module of a language
processing system?
a) Pre-processor
b) Loader
c) Compiler
d) Linker
ANS: a) Pre-processor
19. The linker ____________
a) is same as the loader
b) is required to create load module
c) is always used before programs are executed
d) None of above
ANS: b) is required to create load module
20. In Distributed system, the capacity of a system to adapt the
increased service load is called
a) Tolerance
b) Scalability
c) Capability
d) Loading
ANS: Scalability
21. Loader is a program that
a) Places programs into memory and prepares them for execution
b) Automates the translation of assembly language into machine
language
c) Accepts a program written in ahigh level language and
produces an object program
d) Appears to execute a source program as if it were machine
language
ANS: Places programs into memory and prepares them for execution
22. Consider a program with a linked origin of 5000. Let the
memory area allocated to it have the start address of 70000.
Which among the following will be the value to be loaded in
relocation register?
a) 20000
b) 50000
c) 70000
d) None of the above
23.Resolution of externally defined symbols is performed by
a) Linker
b) Loader
c) Compiler
d) Editor
ANS: a) Linker
24.Reloactable programs
a) Cannot be used with fixed partitions
b) Can be loaded almost anywhere in memory
c) Do not need a linker
d) Can be loaded only at one specific location
ANS: Can be loaded almost anywhere in memory
25.Static memory allocation is typically performed during-
a) Compilation
b) Execution
c) Loading
d) Linking
ANS: a) compilation

26. Linking is process of binding


a) Internal part of a program
b) External functional call
c) External reference to the correct link time address
d) None of the above
ANS: a) External reference to the correct link time address

27. If load origin is not equal to linked origin then relocation is


performed by
a) Loader
b) Linker
c) By program itself
d) Relocation not performed
ANS: a) Loader

28. If linked origin is not equal to translated address, then


relocation is performed by
a) Absolute Loader
b) Loader
c) Linker
d) None of the above
Ans: c) Linker

29. Which is not a function of a loader


a) Allocation
b) Translation
c) Relocation
d) Loading
Ans: b) Translation

30. Binder performs the functions of


a) Allocation
b) Relocation
c) Linking
d) All of these
Ans: d) Allocation
31. Disadvantage of compile and go loading scheme is that
a) A position of memory Is wasted because the case occupied by
the assembler is unavailable the object program
b) It is necessary to retranslate the users program check every
time it is run
c) It is very difficult to handle multiple segments especially if the
source programs are in different language and to
d) produce overlay modular programs
e) All of the above
Ans: e) All of these
32. A self-relocating program in one which
a) Cannot be made to exercise in any area of storage other than
the one designated for it at the time of its coding or
b) translation
c) Consists of a program and relevent information for its
reloaction
d) One itself perform the relocation of its address sensitive
positions
e) All of the above
Ans: d) One itself perform the relocation of its address sensitive
positions
33. Which of the following can be accessed by transfer
vector approach of linking?
a) External data segments
b) External subroutines
c) Data located in other procedure
d) All of these
Ans: b) External subroutines
34. Loaders that allow for program relocation are called
a) Relative loaders
b) Relocating loaders
c) Both (a) and (b)
d) None of the above
Ans: c) Both (a) and (b)
35. When a computer is first turned on or restarted, a
special type of absolute loader, called a ________ is
executed.
a) Bootstrap loader
b) Loader
c) Linker
d) None of the above
Ans: a) Bootstrap loader
36. 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) serially reusable
b) recursive module
c) re-enterable module
d) non-reusable module
Ans: c) re-enterable module
37. During bootstrapping ______ passes the control to the
kernel.
a) Linker
b) linkage editor
c) boot program
d) CPU
Ans: c) boot program
38. Which of the following is a function of absolute Loader
besides loading?
a) Allocation
b) Linking
c) Relocation
d) All of these
Ans: d) All of these
39. Which amongst them is not translator?
a) Assembler
b) Loader
c) Compiler
d) Interpreter
Ans: b) Loader
40. Which of the following are loaded into main memory
when the computer is booted?
a) internal command instructions
b) external command instructions
c) utility programs
d) word processing instructions
e) None of the above
Ans: a) internal command instructions
41.The details of all external symbols and relocation
formation (relocation list or map) is provided to linker by
a) Macro processor
b) Translator
c) Loader
d) Editor
e) None of the above
Ans: B) Translator
42. Object code
a) is ready to execute
b) is the output of compilers, but not assemblers
c) must be "loaded" before execution
d) must be rewritten before execution
e) None of the above
Ans: c) must be "loaded" before execution
UNIT 5: COMPILER

1. What is a compiler?
a) system program that converts instructions to machine language
b) system program that converts machine language to high-level language
c) system program that writes instructions to perform
d) None of the mentioned

Answer: a

2. Which of the following is a stage of compiler design?


a) Semantic analysis
b) Intermediate code generator
c) Code generator
d) All of the mentioned

Answer: d

3. What is the use of a symbol table in compiler design?


a) Finding name’s scope
b) Type checking
c) Keeping all of the names of all entities in one place
d) All of the mentioned

Answer: d

4. Which of the following error can a compiler check?


a) Syntax Error
b) Logical Error
c) Both Logical and Syntax Error
d) Compiler cannot check errors

Answer: a

5. A programmer, writes a program to multiply two numbers instead of dividing


them by mistake, how can this error be detected?
a) Compiler or interpreter
b) Compiler only
c) Interpreter only
d) None of the mentioned

Answer: d

6. Who is responsible for the creation of the symbol table?


a) Assembler
b) Compiler
c) Interpreter
d) All of the mentioned

Answer: b

7. Which of the following is known as a compiler for a high-level language that runs
on one machine and produces code for a different machine?
a) Cross compiler
b) Multipass compiler
c) Optimizing compiler
d) One pass compiler

Answer: a

8.  Which of the following is a system program that integrates a program’s


individually compiled modules into a form that can be executed?
a) Interpreter
b) Assembler
c) Compiler
d) Linking Loader

Answer: d

9. Which of the following is a definition of compiler?


a) Acceptance of a program written in a high-level language and produces an object
program
b) Program is put into memory and executes it
c) Translation of assembly language into machine language
d) None of the mentioned

Answer: a

10.  Which of the following phase of the compiler is Syntax Analysis?


a) Second
b) Third
c) First
d) All of the mentioned

Answer: a

11.  Which of the following concept of FSA is used in the compiler?


a) Code optimization
b) Code generation
c) Lexical analysis
d) Parser
Answer: c

12. Which of the following is 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?
a) Optimizer
b) Scanner
c) Parser
d) None of the mentioned

Answer: b

13. What is CFG?


a) Regular Expression
b) Compiler
c) Language expression
d) All of the mentioned

Answer: b

14.  Which of the following is correct regarding an optimizer Compiler?


a) Optimize the code
b) Is optimized to occupy less space
c) Both of the mentioned
d) None of the mentioned

Answer: d

15. Which of the following error can Compiler diagnose?


a) Logical errors only
b) Grammatical and logical errors
c) Grammatical errors only
d) All of the mentioned

Answer: c

16. In which of the following phase of the compiler is Lexical Analyser?


a) Second
b) Third
c) First
d) All of the mentioned

Answer: c

17.  Which of the following does an address code involve?


a) No unary operators
b) Exactly 3 address
c) At most Three address
d) None of the mentioned

Answer: d

18. An object module for a group of programs that were compiled separately is
handed to a linker. Which of the following about an object module isn’t true?
a) Relocation bits
b) Names and locations of all external symbols denied in the object module
c) Absolute addresses of internal symbols
d) Object code

Answer: c

 19. Characters are grouped into tokens in which of the following phase of the
compiler design?
a) Code generator
b) Lexical analyzer
c) Parser
d) Code optimization

Answer: b

20. Why Generation of intermediate code based on an abstract machine model is


useful in compilers?
a) Writing for intermediate code generation
b) Portability of the front end of the compiler
c) Implementation of lexical analysis and syntax analysis is made easier
d) All of the mentioned

Answer: c

21. Why System program such as compiler are designed?


a) They are Serially usable
b) They are Re-enterable
c) They are Nonreusable
d) All of the mentioned

Answer: b

22.  Which of the following technique is used for building cross compilers for other
machines?
a) Canadian Cross
b) Mexican Cross
c) X-cross
d) Brazilian Cross
Answer: a

23. Which of the following can detect an error if a programmer by mistake writes
multiplication instead of division?
a) Interpreter
b) Compiler or interpreter test
c) Compiler
d) None of the mentioned

Answer: d

24. What is the output of lexical analyzer?


a) A set of RE
b) Syntax Tree
c) Set of Tokens
d) String Character

Answer: c

25. Which symbol table implementation is based on the property of locality of


reference?
a) Linear list
b) Search tree
c) Hash Table
d) Self Organisation

Answer: c

26. Which of the following is true for operator precedence parsing?


a) For all pair of non-terminal
b) For all pair of non-terminals
c) To delimit the handle
d) None of the mentioned

Answer: a

27. What is an Object program?


a) Program written in machine language
b) Program to be translated into machine language
c) Translation of high-level language into machine language
d) None of the mentioned

Answer: c

28. Which concept of FSA is used in the compiler?


a) Lexical analysis
b) Parser
c) Code generation
d) Code optimization

Answer: a

29. Which concept of grammar is used in the compiler?


a) Lexical analysis
b) Parser
c) Code generation
d) Code optimization

Answer: b

30. Which of the following are Lexemes?


a) Identifiers
b) Constants
c) Keywords
d) All of the mentioned

Answer: d

31. What constitutes the stages of the compilation process?


a) Feasibility study, system, design, and testing
b) Implementation and documentation
c) Lexical analysis, syntax, Analysis and code generation
d) None of the mentioned

Answer: c

32. The lexical analyzer takes _________ as input and produces a stream of _______ as
output.
a) Source program, tokens
b) Token, source program
c) Either of the two
d) None of the mentioned

Answer: a

33.  Parsing is also known as ________


a) Lexical Analysis
b) Syntax Analysis
c) Semantic Analysis
d) Code Generation

Answer: b
34. A compiler program written in a high level language is called ________
a) Source Program
b) Object Program
c) Machine Language Program
d) None of the mentioned

Answer: a

35. System program such a compiler are designed so that they are ________
a) Re-enterable
b) Non-Usable
c) Serially usable
d) None of the mentioned

Answer: a

36.Which of the following is not a feature of compiler?


a) Scan the entire program first and translate into machine code
b) To remove syntax errors
c) Slow for debugging
d) Execution time is more

Answer: d

37.  A system program that brings together separately compiled modules of a


program into a form language that is suitable for execution.
a) Assembler
b) Linking loader
c) Cross compiler
d) None of the mentioned

Answer: b

38. A programmer by mistakes writes a program to multiply two numbers instead of


dividing them, how can this error be detected?
a) Compiler
b) Interpreter
c) Compiler or interpreter
d) None of the mentioned

Answer: d

39. Inherited attribute is a natural choice in ___________


a) Variable declarations record is maintained
b) L values and R values
c) All of the mentioned
d) None of the mentioned

Answer: a

40. YACC builds up __________


a) SLR parsing table
b) Canonical LR parsing table
c) LALR parsing table
d) None of the mentioned

Answer: c

41. In an absolute loading scheme which loader function is accomplished by


assembler?
a) Re-allocation
b) Allocation
c) Linking
d) Loading

Answer: a

42. A parser with the valid prefix property is advantageous because it __________
a) Detects errors
b) None of the mentioned
c) Errors are passed to the text phase
d) All of the mentioned

Answer: c

43. The action of parsing the source program into proper syntactic classes is called
__________
a) Syntax Analysis
b) Lexical Analysis
c) Interpretation analysis
d) General Syntax Analysis

Answer: b

44. Relocating bits used by relocating loader are specified by __________


a) Relocating loader itself
b) Linker
c) Assembler
d) Macro Processor

Answer: b
45.  A topdown parser generates __________
a) Rightmost Derivation
b) Right most derivation in reverse
c) Left most derivation
d) Left most derivation in reverse

Answer: c

46.  Running time of a program depends on __________


a) Addressing mode
b) Order of computations
c) The usage of machine idioms
d) All of the mentioned

Answer: d

47. what is terminal table?


a) Contains all constants in the program
b) Is a permanent table of decision rules in the form of patterns for matching with
the uniform symbol table to discover syntactic structure
c) Consist of a full or partial list of the token is as they appear in the program
created by lexical analysis and used for syntax analysis and interpretation
d) Is a permanent table which lists all keywords and special symbols of the language
in symbolic form

Answer: d

48. Advantage of incorporating the macro-processor into pass 1 is that _________


a) Many functions have to be implemented twice
b) Functions are combined not necessarily creating intermediate files as output
from the macro-processor and input to the assembler
c) More flexibility is provided to the programmer in that he may use all the features
of the assembler in conjunction with macros
d) All of the mentioned

Answer: d

49. Which of the following is a phase of a compilation process?


a) Lexical Analysis
b) Code Generation
c) Lexical Analysis & Code Generation
d) None of the mentioned

Answer: c
50.  System program such as compiler are designed so that they are _________
a) Re-enterable
b) Non reusable
c) Serially usable
d) None of the mentioned

Answer: a

51. A series of statements explaining how the data is to be processed is called


_________
a) Assembly
b) Machine
c) COBOL
d) Program

Answer: d

52.  A loader is a program that _________


a) Program that places functions into memory and prepares them for execution
b) Program that automates the translation of assembly language into machine
language
c) Program accepting another program written in a high level language and
produces as object program
d) None of the mentioned

Answer: a

53. Compiler can diagnose __________


a) Grammatical errors only
b) Logical errors only
c) Grammatical and logical errors
d) None of the mentioned

Answer: a

54. A simple two-pass assembler does which of the following in the first pass?
a) It allocates space for the literals
b) Calculates total length of the program
c) Symbol table is built for the symbols and their value
d) All of the mentioned

Answer: d

55. A system program that set-up an executable program in the main memory ready
for execution is?
a) Assembler
b) Linker
c) Loader
d) Text editor

Answer: c

56.  A compiler is a program that ___________


a) Program is put into memory and executes it
b) Translation of assembly language into machine language
c) Acceptance of a program written in a high level language and produces an object
program
d) None of the mentioned

Answer: c

57. A programmer by mistake writes multiplication instead of division, such error


can be detected by?
a) Compiler
b) Interpreter
c) Compiler or interpreter test
d) None of the mentioned

Answer: d

58.The computer language generally translated to pseudocode is ___________


a) Assembly
b) Machine
c) Pascal
d) FORTRAN

Answer: a

59. A system program that combines separately compiled modules of a program


into a form suitable for execution is?
a) Assembler
b) Linking Loader
c) Cross Compiler
d) None of the mentioned

Answer: b

60. In which way a macro processor for assembly language can be implemented?
a) Independent two-pass processor
b) Independent one-pass processor
c) Processor put into pass 1 of a standard two pass assembler
d) All of the mentioned
Answer: d

61.  Resolution of externally defined symbols is performed by ___________


a) Linker
b) Loader
c) Compiler
d) Interpreter

Answer: a

62. LR parsers are attractive because _________


a) It can be constructed to recognize CFG corresponding to almost all programming
constructs
b) It does not backtrack
c) It can be constructed to recognize CFG corresponding to almost all programming
constructs & It does not backtrack
d) None of the mentioned

Answer: c

63.  Which is the most powerful parser?


a) SLR
b) LALR
c) Canonical LR
d) Operator Precedence

Answer: c

64.  An intermediate code form is ___________


a) Postfix Notation
b) Syntax Trees
c) Three address code
d) All of the mentioned

Answer: d

65. Which phase of the compiler is Syntax Analysis?


a) First
b) Second
c) Third
d) None of the mentioned

Answer: b

66. Syntax Analyser is also known as ___________


a) Hierarchical Analysis
b) Hierarchical Parsing
c) None of the mentioned
d) Hierarchical Analysis & Parsing

Answer: d

67. Syntax Analyser takes Groups Tokens of source Program into Grammatical
Production.
a) True
b) False

Answer: a

68. From where it takes its input from?


a) Lexical analyser
b) Syntactic Analyser
c) Semantic Analyser
d) None of the mentioned

Answer: a

69. Parsers are expected to parse the whole code.


a) True
b) False

Answer: a

70. A grammar for a programming language is a formal description of _______________


a) Syntax
b) Semantics
c) Structure
d) Library

Answer: c

You might also like