set-4
151. A computer program written in a high-level language is called a:
- Source program
- Machine language program
- Object program
- None of the above
Show me the answer
Answer: 1. Source program
Explanation:
- Source Program: A source program is written in a high-level language and must be translated into machine language before execution.
- Conclusion: A high-level language program is called a source program.
152. A compiler can diagnose:
- Grammatical errors only
- Logical errors only
- Grammatical as well as logical errors
- Neither grammatical nor logical errors
Show me the answer
Answer: 1. Grammatical errors only
Explanation:
- Compiler Errors: A compiler detects grammatical (syntax) errors in the source code but cannot detect logical errors, which are related to the program’s logic.
- Conclusion: Compilers diagnose grammatical errors only.
153. Compilers are generally written by:
- Computer manufacturers
- Professional programmers
- Computer users
- System analysts
Show me the answer
Answer: 2. Professional programmers
Explanation:
- Compiler Development: Compilers are complex software tools typically written by professional programmers with expertise in language design and implementation.
- Conclusion: Professional programmers write compilers.
154. A programmer, by mistake, writes an instruction to divide instead of multiply. Such an error can be detected by a/an:
- Compiler
- Compiler or interpreter both
- Interpreter
- Neither compiler nor interpreter
Show me the answer
Answer: 4. Neither compiler nor interpreter
Explanation:
- Logical Errors: Errors like using the wrong operator (e.g., divide instead of multiply) are logical errors and cannot be detected by compilers or interpreters.
- Conclusion: Logical errors are not detected by compilers or interpreters.
155. Which is not true about ‘syntax’ and ‘semantics’ parts of a computer language?
- Syntax is generally checked by the programmer
- Semantics is the responsibility of the programmer
- Semantics is checked mechanically by a computer
- Both (B) and (C)
Show me the answer
Answer: 4. Both (B) and (C)
Explanation:
- Syntax and Semantics: Syntax is checked by the compiler, while semantics (meaning) is the responsibility of the programmer. Semantics cannot be mechanically checked by a computer.
- Conclusion: Both (B) and (C) are incorrect.
156. A series of statements explaining how the data is to be processed is called:
- Instruction
- Program
- Compiler
- Interpreter
Show me the answer
Answer: 2. Program
Explanation:
- Program: A program is a series of statements that define how data is processed to achieve a specific result.
- Conclusion: A program processes data.
157. The computer language generally translated to pseudo code is:
- Assembly
- Pascal
- Machine
- PL/I
Show me the answer
Answer: 1. Assembly
Explanation:
- Pseudo Code: Pseudo code is an informal high-level description of a program’s logic. Assembly language is often translated into pseudo code for clarity.
- Conclusion: Assembly language is translated to pseudo code.
158. Application programs used with microcomputers are generally written by:
- The users themselves
- Hardware suppliers
- A team of experts known as ‘third parties’
- IBM
Show me the answer
Answer: 3. A team of experts known as ‘third parties’
Explanation:
- Application Development: Application programs for microcomputers are typically developed by third-party software companies or teams of experts.
- Conclusion: Third-party experts write microcomputer applications.
159. What is true about machine language?
- It is understood by the computer
- It varies from one model of computer to another
- It may always be represented by binary numbers
- All of the above are true
Show me the answer
Answer: 4. All of the above are true
Explanation:
- Machine Language: Machine language is the lowest-level programming language, understood directly by the computer. It varies between computer models and is represented in binary.
- Conclusion: All the statements about machine language are true.
160. Object program is:
- A program written in machine language
- A program to be translated into machine language
- The translation of a high-level language into machine language
- None of the above
Show me the answer
Answer: 3. The translation of a high-level language into machine language
Explanation:
- Object Program: An object program is the machine language version of a high-level language program, produced by a compiler or assembler.
- Conclusion: An object program is the translated version of a high-level program.
161. What is true about assembly language?
- It uses symbolic codes
- It does not vary from one type of computer to another
- It uses binary numbers
- None of the above
Show me the answer
Answer: 1. It uses symbolic codes
Explanation:
- Assembly Language: Assembly language uses symbolic codes (mnemonics) to represent machine instructions, making it easier to write and understand than machine language.
- Conclusion: Assembly language uses symbolic codes.
162. The process of transferring data intended for a peripheral device into a disk (or intermediate store) so that it can be transferred to the peripheral at a more convenient time or in bulk is known as:
- Multiprogramming
- Caching
- Spooling
- Virtual programming
Show me the answer
Answer: 3. Spooling
Explanation:
- Spooling: Spooling (Simultaneous Peripheral Operations On-Line) is the process of transferring data to a disk or intermediate store for later transfer to a peripheral device.
- Conclusion: Spooling allows efficient data transfer to peripherals.
163. A form of code that uses more than one process and processor, possibly of different types, and that may on occasion have more than one process or processor active at the same time is known as:
- Multiprogramming
- Broadcasting
- Multithreading
- Time sharing
Show me the answer
Answer: 3. Multithreading
Explanation:
- Multithreading: Multithreading allows multiple threads within a process to execute concurrently, utilizing multiple processors or cores.
- Conclusion: Multithreading enables concurrent execution of threads.
164. Situations where two or more processes are reading or writing some shared data and the final result depends on who runs precisely when are called:
- Race conditions
- Mutual exclusion
- Critical sections
- Message passing
Show me the answer
Answer: 1. Race conditions
Explanation:
- Race Conditions: Race conditions occur when the outcome of a process depends on the timing of other processes accessing shared data.
- Conclusion: Race conditions arise from concurrent access to shared data.
165. Part of a program where the shared memory is accessed and which should be executed indivisibly is called:
- Semaphores
- Critical section
- Directory
- Mutual exclusion
Show me the answer
Answer: 2. Critical section
Explanation:
- Critical Section: The critical section is the part of a program where shared resources are accessed, and it must be executed indivisibly to prevent race conditions.
- Conclusion: The critical section ensures safe access to shared resources.
166. A relationship between processes such that each has some part (critical section) which must not be executed while the critical section of another is being executed is known as:
- Semaphore
- Multiprogramming
- Mutual exclusion
- Multitasking
Show me the answer
Answer: 3. Mutual exclusion
Explanation:
- Mutual Exclusion: Mutual exclusion ensures that only one process can execute its critical section at a time, preventing interference between processes.
- Conclusion: Mutual exclusion protects critical sections.
167. Which of the following operating systems use write-through caches?
- UNIX
- ULTRIX
- DOS
- XENIX
Show me the answer
Answer: 3. DOS
Explanation:
- Write-Through Cache: In a write-through cache, data is written to both the cache and main memory simultaneously. DOS uses this approach for simplicity.
- Conclusion: DOS uses write-through caches.
168. A disk scheduling algorithm in an operating system causes the disk arm to move back and forth across the disk surface in order to service all requests in its path. This is a:
- First come first served
- SCAN
- Shortest Seek Time First (SSTF)
- Eschenbach scheme
Show me the answer
Answer: 2. SCAN
Explanation:
- SCAN Algorithm: The SCAN algorithm moves the disk arm back and forth across the disk, servicing requests in its path.
- Conclusion: SCAN causes the disk arm to move back and forth.
169. A system program that sets up an executable program in main memory ready for execution is:
- Assembler
- Loader
- Linker
- Text editor
Show me the answer
Answer: 2. Loader
Explanation:
- Loader: The loader is responsible for loading an executable program into memory and preparing it for execution.
- Conclusion: The loader sets up programs for execution.
170. A compiler for a high-level language that runs on one machine and produces code for a different machine is called:
- Optimizing compiler
- Cross compiler
- One-pass compiler
- Multi-pass compiler
Show me the answer
Answer: 2. Cross compiler
Explanation:
- Cross Compiler: A cross compiler generates code for a machine different from the one on which it runs.
- Conclusion: Cross compilers produce code for a different machine.
171. An instruction in a programming language that is replaced by a sequence of instructions prior to assembly or compiling is known as:
- Procedure name
- Label
- Macro
- Literal
Show me the answer
Answer: 3. Macro
Explanation:
- Macro: A macro is a single instruction that is replaced by a sequence of instructions during preprocessing.
- Conclusion: Macros are expanded into multiple instructions.
172. Which of the following translator programs converts assembly language program to object program?
- Assembler
- Macro processor
- Compiler
- Linker
Show me the answer
Answer: 1. Assembler
Explanation:
- Assembler: An assembler converts assembly language programs into machine code (object programs).
- Conclusion: Assemblers translate assembly language to machine code.
173. Which of the following system programs 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?
- Two-pass assembler
- Microprocessor
- Load-and-go assembler
- Compiler
Show me the answer
Answer: 3. Load-and-go assembler
Explanation:
- Load-and-Go Assembler: A load-and-go assembler generates absolute machine code and loads it directly into memory for immediate execution.
- Conclusion: Load-and-go assemblers skip object code generation.
174. System programs such as compilers are designed so that they are:
- Reentrant
- Serially usable
- Non-reusable
- Recursive
Show me the answer
Answer: 1. Reentrant
Explanation:
- Reentrant Programs: Reentrant programs can be interrupted and re-entered without affecting their operation, making them suitable for system programs like compilers.
- Conclusion: Compilers are designed to be reentrant.
175. Memory:
- Is a device that performs a sequence of operations specified by instructions in memory
- Is the device where information is stored
- Is a sequence of instructions
- Is typically characterized by interactive processing and time-slicing of the CPU’s time to allow quick response to each user
Show me the answer
Answer: 2. Is the device where information is stored
Explanation:
- Memory: Memory is the hardware component where data and instructions are stored for processing.
- Conclusion: Memory stores information.
176. A program:
- Is a device that performs a sequence of operations specified by instructions in memory
- Is the device where information is stored
- Is a sequence of instructions
- Is typically characterized by interactive processing and time-slicing of the CPU’s time to allow quick response to each user
Show me the answer
Answer: 3. Is a sequence of instructions
Explanation:
- Program: A program is a sequence of instructions that perform specific tasks when executed by a computer.
- Conclusion: A program consists of instructions.
177. A processor:
- Is a device that performs a sequence of operations specified by instructions in memory
- Is the device where information is stored
- Is a sequence of instructions
- Is typically characterized by interactive processing and time-slicing of the CPU’s time to allow quick response to each user
Show me the answer
Answer: 1. Is a device that performs a sequence of operations specified by instructions in memory
Explanation:
- Processor: The processor (CPU) executes instructions stored in memory to perform operations.
- Conclusion: The processor executes instructions.
178. An assembler is:
- A program that places programs into memory and prepares them for execution
- A program that automates the translation of assembly language into machine language
- A program that accepts a program written in a high-level language and produces an object program
- A program that appears to execute a source program as if it were machine language
Show me the answer
Answer: 2. A program that automates the translation of assembly language into machine language
Explanation:
- Assembler: An assembler translates assembly language programs into machine code.
- Conclusion: Assemblers convert assembly language to machine code.
179. An interpreter is:
- A program that places programs into memory and prepares them for execution
- A program that automates the translation of assembly language into machine language
- A program that accepts a program written in a high-level language and produces an object program
- A program that appears to execute a source program as if it were machine language
Show me the answer
Answer: 4. A program that appears to execute a source program as if it were machine language
Explanation:
- Interpreter: An interpreter executes high-level language programs directly without converting them into machine code.
- Conclusion: Interpreters execute source programs directly.
180. A compiler is:
- A program that places programs into memory and prepares them for execution
- A program that automates the translation of assembly language into machine language
- A program that accepts a program written in a high-level language and produces an object program
- A program that appears to execute a source program as if it were machine language
Show me the answer
Answer: 3. A program that accepts a program written in a high-level language and produces an object program
Explanation:
- Compiler: A compiler translates high-level language programs into machine code (object programs).
- Conclusion: Compilers produce object programs from high-level code.
181. A loader is:
- A program that places programs into memory and prepares them for execution
- A program that automates the translation of assembly language into machine language
- A program that accepts a program written in a high-level language and produces an object program
- A program that appears to execute a source program as if it were machine language
Show me the answer
Answer: 1. A program that places programs into memory and prepares them for execution
Explanation:
- Loader: The loader loads executable programs into memory and prepares them for execution.
- Conclusion: Loaders prepare programs for execution.
182. Virtual Memory
- Is a method of memory allocation by which the program is subdivided into equal portions, or pages, and core is subdivided into equal portions or blocks
- Consists of those addresses that may be generated by a processor during execution of a computation
- Is a method of allocating processor time
- Allows multiple programs to reside in separate areas of core at the time
Show me the answer
Answer: 2. Consists of those addresses that may be generated by a processor during execution of a computation
Explanation:
- Virtual Memory: Virtual memory is a memory management technique that provides an “illusion” of a larger memory space than physically available. It allows processes to use addresses that may not correspond to physical memory locations.
- Conclusion: Virtual memory consists of addresses generated by the processor during execution.
183. Paging
- Is a method of memory allocation by which the program is subdivided into equal portions or pages and core is subdivided into equal portions or blocks
- Consists of those addresses that may be generated by a processor during execution of a computation
- Is a method of allocating processor time
- Allows multiple programs to reside in separate areas of core at the time
Show me the answer
Answer: 1. Is a method of memory allocation by which the program is subdivided into equal portions or pages and core is subdivided into equal portions or blocks
Explanation:
- Paging: Paging is a memory management technique where the program is divided into fixed-size pages, and physical memory is divided into frames of the same size. Pages are loaded into frames as needed.
- Conclusion: Paging divides programs and memory into equal-sized portions.
184. Multiprogramming
- Is a method of memory allocation by which the program is subdivided into equal portions or pages and core is subdivided into equal portions or blocks
- Consists of those addresses that may be generated by a processor during execution of a computation
- Is a method of allocating processor time
- Allows multiple programs to reside in separate areas of core at the time
Show me the answer
Answer: 4. Allows multiple programs to reside in separate areas of core at the time
Explanation:
- Multiprogramming: Multiprogramming allows multiple programs to reside in memory simultaneously, enabling the CPU to switch between them to maximize utilization.
- Conclusion: Multiprogramming enables multiple programs to coexist in memory.
185. The Memory Buffer Register (MBR)
- Is a hardware memory device which denotes the location of the current instruction being executed
- Is a group of electrical circuits (hardware) that performs the intent of instructions fetched from memory
- Contains the address of the memory location that is to be read from or stored into
- Contains a copy of the designated memory location specified by the MAR after a “read” or the new contents of the memory prior to a “write”
Show me the answer
Answer: 4. Contains a copy of the designated memory location specified by the MAR after a “read” or the new contents of the memory prior to a “write”
Explanation:
- Memory Buffer Register (MBR): The MBR holds the data being transferred to or from memory. After a read operation, it contains the data from the memory location specified by the Memory Address Register (MAR). Before a write operation, it holds the data to be written to memory.
- Conclusion: The MBR stores data during memory read/write operations.
186. The Memory Address Register (MAR)
- Is a hardware memory device which denotes the location of the current instruction being executed
- Is a group of electrical circuits (hardware) that performs the intent of instructions fetched from memory
- Contains the address of the memory location that is to be read from or stored into
- Contains a copy of the designated memory location specified by the MAR after a “read” or the new contents of the memory prior to a “write”
Show me the answer
Answer: 3. Contains the address of the memory location that is to be read from or stored into
Explanation:
- Memory Address Register (MAR): The MAR holds the address of the memory location to be accessed during a read or write operation.
- Conclusion: The MAR stores memory addresses for read/write operations.
187. The Instruction Register (IR)
- Is a hardware memory device which denotes the location of the current instruction being executed
- Is a group of electrical circuits (hardware) that performs the intent of instructions fetched from memory
- Contains the address of the memory location that is to be read from or stored into
- Contains a copy of the designated memory location specified by the MAR after a “read” or the new contents of the memory prior to a “write”
Show me the answer
Answer: 2. Is a group of electrical circuits (hardware) that performs the intent of instructions fetched from memory
Explanation:
- Instruction Register (IR): The IR holds the current instruction being executed by the CPU. It decodes and executes the instruction.
- Conclusion: The IR stores and executes instructions.
188. Advantage(s) of using assembly language rather than machine language is (are):
- It is mnemonic and easy to read
- Addresses are symbolic, not absolute
- Introduction of data to the program is easier
- All of the above
Show me the answer
Answer: 4. All of the above
Explanation:
- Assembly Language: Assembly language uses mnemonics and symbolic addresses, making it easier to read and write compared to machine language. It also simplifies data handling.
- Conclusion: Assembly language offers several advantages over machine language.
189. Pass 1 of an assembler:
- Assigns addresses to all statements in the program
- Saves the values assigned to all labels for use in Pass 2
- Performs some processing of assembler directives
- All of the above
Show me the answer
Answer: 4. All of the above
Explanation:
- Pass 1 of Assembler: In the first pass, the assembler assigns addresses to statements, saves label values, and processes assembler directives.
- Conclusion: Pass 1 performs multiple tasks to prepare for Pass 2.
190. Pass 2 of an assembler:
- Assembles instructions and generates data
- Performs processing of assembler directives not done during Pass 1
- Writes the object program and the assembly listing
- All of the above
Show me the answer
Answer: 4. All of the above
Explanation:
- Pass 2 of Assembler: In the second pass, the assembler generates machine code, processes remaining directives, and produces the object program and assembly listing.
- Conclusion: Pass 2 completes the assembly process.
191. The System/370 assembler language:
- Allows the programmer to write base registers and displacements explicitly in the source program
- Is used to remember which of the general-purpose registers are currently available as base registers, and what base addresses they contain
- Allows multiple programs to reside in separate areas of core at the same time
- Is a term that refers to the control programs of an operating system
Show me the answer
Answer: 1. Allows the programmer to write base registers and displacements explicitly in the source program
Explanation:
- System/370 Assembler: The System/370 assembler allows programmers to specify base registers and displacements explicitly in the source code.
- Conclusion: This feature provides flexibility in addressing.
192. A base register table:
- Allows the programmer to write base registers and displacements explicitly in the source program
- Is used to remember which of the general-purpose registers are currently available as base registers, and what base addresses they contain
- Allows multiple programs to reside in separate areas of core at the same time
- Is a term that refers to the control programs of an operating system
Show me the answer
Answer: 2. Is used to remember which of the general-purpose registers are currently available as base registers, and what base addresses they contain
Explanation:
- Base Register Table: The base register table tracks which general-purpose registers are used as base registers and their corresponding base addresses.
- Conclusion: It helps manage base registers in assembly programming.
193. Addressing structure:
- Defines the fundamental method of determining effective operand addresses
- Are variations in the use of fundamental addressing structures, or some associated actions which are related to addressing
- Performs indicated operations on two fast registers of the machine and leaves the result in one of the registers
- All of the above
Show me the answer
Answer: 1. Defines the fundamental method of determining effective operand addresses
Explanation:
- Addressing Structure: The addressing structure defines how effective operand addresses are calculated in a computer system.
- Conclusion: It is fundamental to memory access and instruction execution.
194. Addressing modes:
- Defines the fundamental method of determining effective operand addresses
- Are variations in the use of fundamental addressing structures, or some associated actions which are related to addressing
- Performs indicated operations on two fast registers of the machine and leaves the result in one of the registers
- All of the above
Show me the answer
Answer: 2. Are variations in the use of fundamental addressing structures, or some associated actions which are related to addressing
Explanation:
- Addressing Modes: Addressing modes are variations in how operands are specified in instructions, such as immediate, direct, indirect, and indexed addressing.
- Conclusion: Addressing modes provide flexibility in operand access.
195. The Register-to-Register (RR) instructions:
- Have both their operands in the main store
- Perform an operation on a register operand and an operand located in the main store, generally leaving the result in the register
- Perform indicated operations on two fast registers of the machine and leave the result in one of the registers
- All of the above
Show me the answer
Answer: 3. Perform indicated operations on two fast registers of the machine and leave the result in one of the registers
Explanation:
- RR Instructions: Register-to-Register instructions operate on two registers and store the result in one of them.
- Conclusion: RR instructions are efficient for register-based operations.
196. The Register-to-Storage (RS) instructions:
- Have both their operands in the main store
- Perform an operation on a register operand and an operand located in the main store, generally leaving the result in the register
- Perform indicated operations on two fast registers of the machine and leave the result in one of the registers
- All of the above
Show me the answer
Answer: 2. Perform an operation on a register operand and an operand located in the main store, generally leaving the result in the register
Explanation:
- RS Instructions: Register-to-Storage instructions operate on a register and a memory location, storing the result in the register.
- Conclusion: RS instructions facilitate register-memory operations.
197. The Storage-to-Storage (SS) instructions:
- Have both their operands in the main store
- Perform an operation on a register operand and an operand located in the main store, generally leaving the result in the register
- Perform indicated operations on two fast registers of the machine and leave the result in one of the registers
- All of the above
Show me the answer
Answer: 1. Have both their operands in the main store
Explanation:
- SS Instructions: Storage-to-Storage instructions operate on two memory locations.
- Conclusion: SS instructions are used for memory-to-memory operations.
198. Which of the following are Language Processors?
- Assemblers
- Interpreters
- Compilers
- All of the above
Show me the answer
Answer: 4. All of the above
Explanation:
- Language Processors: Assemblers, interpreters, and compilers are all language processors that convert high-level or assembly code into machine code.
- Conclusion: All three are types of language processors.
199. The specific tasks Storage Manager performs are:
- Allocation/deallocation of storage to programs
- Protection of the storage area allocated to a program from illegal access by other programs in the system
- The status of each program
- Both (A) and (B)
Show me the answer
Answer: 4. Both (A) and (B)
Explanation:
- Storage Manager: The storage manager allocates and deallocates memory and protects memory areas from unauthorized access.
- Conclusion: The storage manager handles allocation and protection.
200. The process manager (or processor manager) has to keep track of:
- The status of each program
- The priority of each program
- The information management support to a programmer using the system
- Both (A) and (B)
Show me the answer
Answer: 4. Both (A) and (B)
Explanation:
- Process Manager: The process manager tracks the status and priority of each program to ensure efficient CPU scheduling.
- Conclusion: It manages program status and priority.