Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

Multiple choice question for engineering

Set 1

1. The main memory in a Personal Computer (PC) is made of_____
a) Cache memory
b) Static RAM
c) Dynamic Ram
d) Both of the mentioned

View Answer

Answer: d [Reason:] It is made up of cache memory and RAM.

2. Cache memory works on the principle of_____
a) Locality of data .
b) Locality of memory
c) Locality of reference
d) Locality of reference & memory

View Answer

Answer: c [Reason:] Cache works on Locality of reference.

3. An n-bit microprocessor has_____
a) n-bit program counter
b) n-bit address register
c) n-bit ALU
d) n-bit instruction register

View Answer

Answer: d [Reason:] N bit microprocessor has bit instruction register.

4. When CPU is executing a Program that is part of the Operating System, it is said to be in _____
a) Interrupt mode
b) System mode
c) Half mode
d) Simplex mode

View Answer

Answer: b [Reason:] It is in System Mode.

5. Logic X-OR operation of (4ACO) H & (B53F) H results _____
a) AACB
b) 0000
c) FFFF
d) ABCD

View Answer

Answer: c [Reason:] Xoring the two operands we get FFFF.

6. If the main memory is of 8K bytes and the cache memory is of 2K words. It uses associative mapping. Then each word of cache memory shall be_____
a) 11 bits
b) 21 bits
c) 16 bits
d) 20 bits

View Answer

Answer: c [Reason:] Each should be 8*2=16 bits.

7. A Stack-organised Computer uses instruction of _____
a) Indirect addressing
b) Two-addressing
c) Zero addressing
d) Index addressing

View Answer

Answer: c [Reason:] Zero addressing modes are used in stack organised computer.

8. In a program using subroutine call instruction, it is necessary______
a) Initialize program counter
b) Clear the accumulator
c) Reset the microprocessor
d) Clear the instruction register

View Answer

Answer: d [Reason:] It is mandatory to clear the instruction register.

9. Virtual memory consists of _______
a) Static RAM
b) Dynamic RAM
c) Magnetic memory
d) None of the mentioned

View Answer

Answer: a [Reason:] It does consist of static RAM.

10. In signed-magnitude binary division, if the dividend is (11100)2 and divisor is (10011)2 then the result is ______
a) (00100)2
b) (10100)2
c) (11001)2
d) (01100)2

View Answer

Answer: b [Reason:] After division we get 20 which is 10100.

Set 2

1. Which phase of compiler is Syntax Analysis
a) First
b) Second
c) Third
d) None of the mentioned

View Answer

Answer: b [Reason:] It is Second Phase Of Compiler after Lexical Analyzer.

2. What is Syntax Analyser also known as
a) Hierarchical Analysis
b) Hierarchical Parsing
c) None of the mentioned
d) Hierarchical Analysis & Parsing

View Answer

Answer: d [Reason:] It is also called as Hierarchical Analysis or Parsing.

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

View Answer

Answer: a [Reason:] It Groups Tokens of source Program into Grammatical Production.

4. From where it take its input from?
a) Lexical analyser
b) Syntactic Analyser
c) Semantic Analyser
d) None of the mentioned

View Answer

Answer: a [Reason:] A syntax analyzer or parser takes the input from a lexical analyzer in the form of token streams.

5. Parsers are expected to parse the whole code
a) True
b) False

View Answer

Answer: a [Reason:] Parsers are expected to parse the whole code even if some errors exist in the program.

6. A grammar for a programming language is a formal description of
a) Syntax
b) Semantics
c) Structure
d) Library

View Answer

Answer: c [Reason:] The grammar clearly indicates that which type of a structure does a program has.

7. Which of these is not true about Symbol Table?
a) All the labels of the instructions are symbols
b) Table has entry for symbol name address value
c) Perform the processing of the assembler directives
d) Created during pass 1

View Answer

Answer: c [Reason:] The Symbol table does not ever perform the processing of the assembler derivative.

8. Which of these features of assembler are Machine-Dependent
a) Instruction formats
b) Addressing modes
c) Program relocation
d) All of the mentioned

View Answer

Answer: d [Reason:] All of these options are features of assembler which are machine dependent.

9. A compiler can check?
a) Logical Error
b) Syntax Error
c) Both Logical and Syntax Error
d) Not Logical and Syntax Error

View Answer

Answer: b [Reason:] No compiler can ever check logical errors.

10. The fourth Generation computer was made up of?
a) Transistor
b) Vacuum tubes
c) Chips
d) Microprocessor chips

View Answer

Answer: d [Reason:] It is the only way to increase its throughput.

Set 3

1. Select a Machine Independent phase of the compiler
a) Syntax Analysis
b) Intermediate Code generation
c) Lexical Analysis
d) All of the mentioned

View Answer

Answer: d [Reason:] All of them work independent of a machine.

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

View Answer

Answer: c [Reason:] A loader which combines the functions of a relocating loader with the ability to combine a number of program segments that have been independently compiled.

3. Which of the following system software resides in the main memory always
a) Text Editor
b) Assembler
c) Linker
d) Loader

View Answer

Answer: d [Reason:] Loader is used to loading programs.

4. Output file of Lex is _____ the input file is Myfile?
a) Myfile.e
b) Myfile.yy.c
c) Myfile.lex
d) Myfile.obj

View Answer

Answer: b [Reason:] This Produce the filr “myfile.yy.c” which we can then compile with g++.

5. Type checking is normally done during?
a) Lexical Analysis
b) Syntax Analysis
c) Syntax Directed Translation
d) Code generation

View Answer

Answer: c [Reason:] It is the function of Syntax directed translation.

6. Suppose One of the Operand is String and other is Integer then it does not throw error as it only checks whether there are two operands associated with ‘+’ or not .
a) True
b) False

View Answer

Answer: a [Reason:] Syntax analyser does not check the type of the operand.

7. In Short Syntax Analysis Generates Parse Tree
a) True
b) False

View Answer

Answer: a [Reason:] Short Syntax Analysis generates a parse tree.

8. By whom is the symbol table created?
a) Compiler
b) Interpreter
c) Assembler
d) None of the mentioned

View Answer

Answer: a [Reason:] Symbol table is created by the compiler which contains the list of lexemes or tokens.

9. What does a Syntactic Analyser do?
a) Maintain Symbol Table
b) Collect type of information
c) Create parse tree
d) None of the mentioned

View Answer

Answer: c [Reason:] Syntax analyzer will just create parse tree. Semantic Analyzer checks the meaning of the string parsed.

10. Semantic Analyser is used for?
a) Generating Object code
b) Maintaining symbol table
c) Generating Object code & Maintaining symbol table
d) None of the mentioned

View Answer

Answer: c [Reason:] Maintaining the Symbol Table for each block. Source Program for Semantic Errors. Collects Type Information for Code Generation. Reporting compile-time errors in the code Generating the object code (e.g., assembler or intermediate code).

Set 4

1. In a single pass assembler, most of the forward references can be avoided by putting the restriction
a) On the number of strings/life reacts
b) Code segment to be defined after data segment
c) On unconditional rump
d) None of the mentioned

View Answer

Answer: b [Reason:] A single pass assembler scans the program only once and creates the equivalent binary program.

2. The method which merges the bodies of two loops is
a) Loop rolling
b) Loop jamming
c) Constant folding
d) None of the mentioned

View Answer

Answer: b [Reason:] In computer science, loop fusion (or loop jamming) is a compiler optimization and loop transformation which replaces multiple loops with a single one.

3. Assembly code data base is associated with
a) Code is converted into assembly.
b) Table of rules in the form of patterns for matching with the uniform symbol table to discover syntactic structure.
c) All of the mentioned
d) None of the mentioned

View Answer

Answer: a [Reason:] An assembly language is a low-level programming language for a computer, or other programmable device, in which there is a very strong (generally one-to-one) correspondence between the language and the architecture’s machine code instructions

4. The process manager has to keep track of
a) Status of each program
b) Information to a programmer using the system
c) Both of the mentioned
d) None of the mentioned

View Answer

Answer: c [Reason:] Process manager keep track of the status and info about the program

5. Function of the syntax phase is to
a) recognize the language and to cal the appropriate action routines that will generate the intermediate form or matrix for these constructs
b) Build a literal table and an identifier table
c) Build a uniform symbol table
d) Parse the source program into the basic elements or tokens of the language

View Answer

Answer: a [Reason:] In this phase symbol table is created by the compiler which contains the list of lexemes or tokens.

6. If E be a shifting operation applied to a function f, such that E(f) = f (x +β ), then
a) E (αf+β g) =α E(f) +β E (g)
b) E (αf +β g )=. ( α+ β )+ E (f + g)
c) E (αf +β g )=α E (f+gβ)
d) E (αf +β g )=αβ E (f + g)

View Answer

Answer: a [Reason:] Shifting operation when performed gives this result

7. Pass I
a) Assign address to all statements
b) Save the values assigned to all labels for use in pass 2
c) Perform some processing
d) All of the mentioned

View Answer

Answer: d [Reason:] The pass 1 of a compiler the above mentioned functions are performed

8. Which table is a permanent database that has an entry for each terminal symbol?
a) Terminal Table
b) Literal Table
c) Identifier Table
d) None of the mentioned

View Answer

Answer: a [Reason:] A database that has entry for each terminal symbols such as arithmetic operators, keywords, punctuation characters such as ‘;’, ‘,’etc Fields: Name of the symbol.

9. Which of the following functions is performed by loader?
a) Allocate memory for the programs and resolve symbolic references between objects decks
b) Address dependent locations, such as address constants, to correspond to the allocated space
c) Physically place the machine instructions and data into memory
d) All of the mentioned

View Answer

Answer: d [Reason:] A loader is the part of an operating system that is responsible for loading programs and libraries.

10. The root directory of a disk should be placed
a) At a fixed address in main memory
b) At a fixed location on the disk
c) Anywhere on the disk
d) None of the mentioned

View Answer

Answer: b [Reason:] Root directory is placed at a fixed disk location

Set 5

1. The segment base is specified using the register named is
a) ORG instructions
b) TITLE instruction
c) ASSUME instruction
d) SEGMENT instruction

View Answer

Answer: a [Reason:] ORG segment base register is used to specify the register

2. In what module multiple instances of execution will yield the same result even if one instance has not terminated before the next one has begun?
a) Non usable module
b) Serially usable
c) Re-enter-able
d) None of the mentioned

View Answer

Answer: c [Reason:] Re enter-able module is the reason why the compiler is used in the first place.

3. Dividing a project into segments and smaller units in order to simplify design and programming efforts is called
a) Modular approach
b) Top down approach
c) Bottom up approach
d) Left right approach

View Answer

Answer: a [Reason:] Modular design, or “modularity in design”, is a design approach that subdivides a system into smaller parts called modules or skids that can be independently created and then used in different systems.

4. Which one of the following is the tightest upper bound that represents the time complexity of inserting an object into a binary search tree of n nodes?
a) O(1)
b) O(long)
c) O(n)
d) O(long)

View Answer

Answer: c [Reason:] For skewed binary search tree on n nodes, the upper bound to insert a node is O (n)

5. Which of the following is true for machine language?
a) Continuous execution of program segments
b) Depicting flow of data in a system
c) A sequence of instructions which solves a problem
d) The language which interacts with the computer using only the binary digits 1 and 0

View Answer

Answer: d [Reason:] Machine code or machine language is a set of instructions executed directly by a computer’s central processing unit (CPU). Each instruction performs a very specific task.

6. Software that measures, monitors, and controls events is
a) System S/w
b) Real Time software
c) Scientific software
d) Business Software

View Answer

Answer: b [Reason:] In computer science, real-time computing (RTC), or reactive computing describes hardware and software systems subject to a “real-time constraint”, for example operational deadlines from event to system response.

7. A linker is given object module for a set of programs that were compiled separately. What is not true about an object module
a) Object code
b) Relocation bits
c) Names and locations of all external symbols denied in the object module
d) Absolute addresses of internal symbols

View Answer

Answer: d [Reason:] a linker or link editor is a computer program that takes one or more object files generated by a compiler and combines them into a single executable file, library file, or another object file.

8. The table created by lexical analysis to describe all literals used in the source program is
a) Terminal table
b) Literal table
c) Identifier table
d) Reductions

View Answer

Answer: b [Reason:] In computer science, and specifically in compiler and assembler design, literal pool is a lookup table used to hold literals during assembly and execution.

9. Which loader function is accomplished by loader?
a) Reallocation
b) Allocation
c) Linking
d) Loading

View Answer

Answer: d [Reason:] Function of a loader

.woocommerce-message { background-color: #98C391 !important; }