Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

UNIT-1(Introduction To System Programming)

1. The system/370 assembler language


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 D

2. Which of the following functions is/ are performed by the loader?

A. Allocate space in memory for the programs and resolve symbolic references between object decks

B. Physically place the machine instructions and data into memory

C. Adjust all address dependent locations, such as address constants, to correspond to the allocated space

D. All of the above

Answer: Option D

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

A. many functions do not have to be implemented twice

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

C. more flexibility is available to the programmer in which he/she may use all the features of the assembler in
conjunction with macros

D. All of the above

Answer: Option D

4. In which addressing mode, the effective address of the operand is generated by adding a constant value to
the contents of register?

A. absolute mode
B. indirect mode

C. immediate mode

D. index mode

Answer: Option D

5. The system/370 assembler language

A. allows the programmer to write base registers and displacements explicitly in the source program.

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. is a term that refers to the control programs of an operating system.

E. None of the above

Answer: Option A

6. If there are multiple recycle bin for a hard disk

A. You can set different size for each recycle bin

B. You can choose which recycle bin to use to store your deleted files

C. You can make any one of them default recycle bin

D. None of above

Answer: Option A

7. Identify false statement

A. You can find deleted files in recycle bin

B. You can restore any files in recycle bin if you ever need

C. You can increase free space of disk by sending files in recycle bin

D. You can right click and choose Empty Recycle Bin to clean it at once
Answer: Option C

8. If the displayed system time and date is wrong, you can reset it using

A. Write

B. Calendar

C. Write file

D. Control panel

Answer: Option D

9. You should save your computer from?

A. Viruses

B. Time bombs

C. Worms

D. All of the above

Answer: Option D

10.. What is an operating system?


a) interface between the hardware and application programs
b) collection of programs that manages hardware resources
c) system service provider to the application programs
d) all of the mentioned
Answer: d

11. What is the main function of the command interpreter?


a) to provide the interface between the API and application program
b) to handle the files in the operating system
c) to get and execute the next user-specified command
d) none of the mentioned
Answer: c

12. In Operating Systems, which of the following is/are CPU scheduling algorithms?
a) Priority
b) Round Robin
c) Shortest Job First
d) All of the mentioned
Answer: d
13. To access the services of the operating system, the interface is provided by the ___________
a) Library
b) System calls
c) Assembly instructions
d) API
Answer: b

14. CPU scheduling is the basis of ___________


a) multiprogramming operating systems
b) larger memory sized systems
c) multiprocessor systems
d) none of the mentioned

Answer: a

15. Which one of the following is not true?


a) kernel remains in the memory during the entire computer session
b) kernel is made of various modules which can not be loaded in running operating system
c) kernel is the first part of the operating system to load into memory during booting
d) kernel is the program that constitutes the central core of the operating system
Answer: b

16. Which one of the following errors will be handle by the operating system?
a) lack of paper in printer
b) connection failure in the network
c) power failure
d) all of the mentioned

Answer: d

17. Which one of the following is not a real time operating system?
a) RTLinux
b) Palm OS
c) QNX
d) VxWorks

Answer: b

18. What does OS X has?


a) monolithic kernel with modules
b) microkernel
c) monolithic kernel
d) hybrid kernel

Answer: d
19. In operating system, each process has its own __________
a) open files
b) pending alarms, signals, and signal handlers
c) address space and global variables
d) all of the mentioned

Answer: d

20. In a timeshare operating system, when the time slot assigned to a process is completed, the process
switches from the current state to?
a) Suspended state
b) Terminated state
c) Ready state
d) Blocked state

Answer: c

UNIT-2 Assembler
1. __________ converts the programs written in assembly language into machine instructions.
a) Machine compiler
b) Interpreter
c) Assembler
d) Converter

Answer: c
2. The instructions like MOV or ADD are called as ______
a) OP-Code
b) Operators
c) Commands
d) None of the mentioned
Answer: a

3. 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

Answer: b

4. Instructions which won’t appear in the object program are called as _____
a) Redundant instructions
b) Exceptions
c) Comments
d) Assembler Directives

Answer: d
5. The assembler directive EQU, when used in the instruction: Sum EQU 200 does ________
a) Finds the first occurrence of Sum and assigns value 200 to it
b) Replaces every occurrence of Sum with 200
c) Re-assigns the address of Sum by adding 200 to its original address
d) Assigns 200 bytes of memory starting the location of Sum

Answer: b

6. The purpose of the ORIGIN directive is __________


a) To indicate the starting position in memory, where the program block is to be stored
b) To indicate the starting of the computation code
c) To indicate the purpose of the code
d) To list the locations of all the registers used
Answer: a

7. The directive used to perform initialization before the execution of the code is ______
a) Reserve
b) Store
c) Dataword
d) EQU
Answer: c
8. _____ directive is used to specify and assign the memory required for the block of code.
a) Allocate
b) Assign
c) Set
d) Reserve

Answer: d

9. _____ directive specifies the end of execution of a program.


a) End
b) Return
c) Stop
d) Terminate

Answer: b

10. The last statement of the source program should be _______


a) Stop
b) Return
c) OP
d) End

Answer: d

11. When dealing with the branching code the assembler ___________
a) Replaces the target with its address
b) Does not replace until the test condition is satisfied
c) Finds the Branch offset and replaces the Branch target with it
d) Replaces the target with the value specified by the DATAWORD directive

Answer: c

12. The assembler stores all the names and their corresponding values in ______
a) Special purpose Register
b) Symbol Table
c) Value map Set
d) None of the mentioned

Answer: b

13. The assembler stores the object code in ______


a) Main memory
b) Cache
c) RAM
d) Magnetic disk

Answer: d

UNIT-3 Macro & Macro Processor

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 within a macro is called


a) macro-within-macro
b) nested macro
c) macro-in-macro
d) none of the mentioned
Answer: b
4. 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

5. 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
6. The end of a macro can be represented by the directive.
a) END
b) ENDS
c) ENDM
d) ENDD
Answer: c

7. 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

8. 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 mentioned
Answer: b

9. 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
Answer: c

10. The beginning of the macro can be represented as


a) START
b) BEGIN
c) MACRO
d) None of the mentioned
Answer: c

11. What is Microprocessor?


a) A multipurpose PLD that accepts binary data as input
b) A multipurpose PLD that accepts an integer as input
c) A multipurpose PLD that accepts whole numbers as input
d) A multipurpose PLD that accepts prime numbers as input
Answer: a
12. Which of the following is correct about 8086 microprocessor?
a) Intel’s first x86 processor
b) Motrola’s first x86 processor
c) STMICROELECTRONICS’s first x86 processor
d) NanoXplore x86 processor
Answer: a
13. Which of the following is a type of microprocessor?
a) CISC
b) RISC
c) EPIC
d) All of the mentioned
Answer: d
14. The microprocessor of a computer can operate on any information if it is present in ______________
only.
a) Program Counter
b) Flag
c) Main Memory
d) Secondary Memory
Answer: c
15. Which of the following technology was used by Intel to design its first 8-bit microprocessor?
a) NMOS
b) HMOS
c) PMOS
d) TTL
Answer: c

UNIT-4 Linker & Loader

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 a correct statement?


I. For some programming languages, there are parsing algorithms with an O(3) complexity.
II. A recursive programming language can be constructed with static storage allocation.
III. In the context of bottom-up parsing, no L-attributed definition can be evaluated.
IV. Code-improvement modifications can be carried out at both the intermediate and
source code levels.
a) I and III
b) I and IV
c) I, II and IV
d) I, II, III and IV
Answer: b

15. 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

16. 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

17. 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

18. 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

19. 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

20. 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

UNIT-5
1. The major number identifies the _____ associated with the device.
a) driver
b) protocol
c) port
d) none of the mentioned
Answer: a

2. The minor number range should be


a) 0 to 15
b) 0 to 63
c) 0 to 255
d) none of the mentioned
Answer: c
3. Which one of the following is not true?
a) dynamic allocation of major numbers is not possible
b) major number can not be shared among drivers
c) dynamic allocation of major numbers is not possible & also major number can not be
shared among drivers
d) none of the mentioned
Answer: c

4. In linux kernel 2.4, we can have


a) 256 character drivers only
b) 256 block drivers only
c) 256 character drivers and 256 block drivers at the same time
d) none of the mentioned
Answer: c

5. In we use a driver for N number of files, then we have to create ____ device files.
a) N
b) 1
c) N-1
d) None of the mentioned

Answer: a
6. If we use a driver for various device files, then
a) minor number will be different for every device file
b) minor number will be same for every device file
c) minor number can not be allocated for any device file
d) none of the mentioned
Answer: a
7. The connection between the device file and device driver is based on the
a) name of device file
b) number of device file
c) name & number of device file
d) none of the mentioned
Answer: b

8. In linux kernel 2.1, the minor numbers were used to


a) represnt the sub-functionalitites of the driver
b) identify the driver
c) represent the device files
d) none of the mentioned
Answer: a

9. The kernel identifies the driver with its


a) module
b) major number
c) device file
d) none of the mentioned
Answer: b

10. In linux, a device driver can work without the


a) major number
b) minor number
c) device file name
d) none of the mentioned
Answer: d

You might also like