InterviewSolution
Saved Bookmarks
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 101. |
Which of the following system software resides in the main memory?(a) Text Editor(b) Assembler(c) Linker(d) Loader |
|
Answer» The correct choice is (d) Loader The best explanation: Loader is used to loading programs. |
|
| 102. |
N bits in operation code imply that there are ___________ possible distinct Operators.(a) 2n(b) 2^n(c) n/2(d) n2 |
|
Answer» Right option is (b) 2^n For explanation I would say: 2^n possible combinations. |
|
| 103. |
A group of bits that tell the computer to perform a specific operation is known as ________(a) Instruction code(b) Micro-operation(c) Accumulator(d) Register |
|
Answer» Correct choice is (a) Instruction code Best explanation: Instruction code is the set of specific tasks to be performed. |
|
| 104. |
The method which merges the bodies of two loops is?(a) Loop rolling(b) Loop jamming(c) Constant folding(d) None of the mentioned |
|
Answer» The correct choice is (b) Loop jamming Explanation: In computer science, loop fusion (or loop jamming) is a compiler optimization and loop transformation which replaces multiple loops with a single one. |
|
| 105. |
The computer language generally translated to pseudocode is ___________(a) Assembly(b) Machine(c) Pascal(d) FORTRAN |
|
Answer» Right option is (a) Assembly Easiest explanation: An assembly language (or assembler 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. |
|
| 106. |
Which one of the following is true about the action of yacc for the given grammar?(a) It detects recursion and eliminates recursion(b) It detects reduce-reduce conflict and resolves(c) It detects shift-reduce conflict and resolves the conflict in favor of a shift over a reduce action(d) It detects shift-reduce conflict and resolves the conflict in favor of a reduce over a shift action |
|
Answer» Right option is (c) It detects shift-reduce conflict and resolves the conflict in favor of a shift over a reduce action The best I can explain: Yacc tool is used to create a LALR(1) parser. |
|
| 107. |
When will the relationship between ‘+’ and ‘-’ be |
|
Answer» Correct option is (c) All of the mentioned To explain I would say: Both statements are true. |
|
| 108. |
When will the relationship between ‘’ be |
|
Answer» The correct answer is (d) Undefined For explanation I would say: Undefined. There is no existing relationship between the two. |
|
| 109. |
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 |
|
Answer» The correct option is (a) Modular approach The best I can explain: 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. |
|
| 110. |
What is Pass 2?(a) Assemble instruction and generate data(b) Perform processing of assembler(c) Write the object program(d) All of the mentioned |
|
Answer» Correct choice is (d) All of the mentioned For explanation: A multi-pass compiler is a type of compiler that processes the source code or abstract syntax tree of a program several times. Each pass takes the result of the previous pass as the input and creates an intermediate output. |
|
| 111. |
Which of the following statement is true?(a) SLR powerful than LALR(b) LALR powerful than Canonical LR parser(c) Canonical LR powerful than LALR parser(d) The parsers SLR= Canonical LR=LALR |
|
Answer» The correct answer is (c) Canonical LR powerful than LALR parser Best explanation: LR > LALR > SLR In terms of the parser. |
|
| 112. |
Which of the following module does not incorporate initialization of values changed by the module?(a) Non reusable module(b) Serially reusable module(c) Re-enterable module(d) All of the mentioned |
|
Answer» The correct answer is (a) Non reusable module Explanation: Non reusable models can be used once for a purpose they can’t be modified and used again. |
|
| 113. |
A relocatable program form is one which?(a) Cannot execute in any area of storage other than the one designated(b) Consists of a program and information for its relocation(c) None of the mentioned(d) All of the mentioned |
|
Answer» Correct option is (c) None of the mentioned Best explanation: A relocatable program form is one which consists of a program and relevant information for its relocation. Using this information it is possible to relocate the program to execute from a storage area then the one designated for it at the time of its coding or translation. |
|
| 114. |
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 |
|
Answer» Correct answer is (c) Re-enter-able Best explanation: Re enter-able module is the reason why the compiler is used in the first place. |
|
| 115. |
A non relocatable program is the one which?(a) Cannot execute in any area of storage other than the one designated(b) Consists of a program and information for its relocation(c) None of the mentioned(d) All of the mentioned |
|
Answer» Right option is (a) Cannot execute in any area of storage other than the one designated For explanation: A non reloadable program is one which 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. |
|
| 116. |
The identification of common sub-expression and replacement of run-time computations by compile-time computations is _____________(a) Local optimization(b) Loop optimization(c) Constant folding(d) Data flow analysis |
|
Answer» The correct choice is (c) Constant folding For explanation: Constant folding is the process of recognizing and evaluating constant expressions at compile time rather than computing them at runtime. Terms in constant expressions are typically simple literals they may also be variables whose values are assigned at compile time. |
|
| 117. |
When expression sum=3+2 is tokenized then what is the token category of 3?(a) Identifier(b) Assignment operator(c) Integer Literal(d) Addition Operator |
|
Answer» Right answer is (c) Integer Literal To elaborate: Lexeme Token category |
|
| 118. |
Daisy chain is a device for ___________(a) None of the mentioned(b) Connecting devices to a controller(c) Connecting controller to devices(d) All of the mentioned |
|
Answer» Right choice is (b) Connecting devices to a controller Easy explanation: Combines multiple devices in sequence or a ring. |
|
| 119. |
Producer consumer problem can be solved using __________(a) Semaphores(b) Event counters(c) Monitors(d) All of the mentioned |
|
Answer» The correct choice is (d) All of the mentioned To elaborate: The famous producer consumer problem can be solved by a semaphores event counters as well as monitors. |
|
| 120. |
Which of the following type of software should be used if you need to create, edit and print documents?(a) Word processing(b) Spreadsheet(c) Desktop publishing(d) UNIX |
|
Answer» Correct answer is (a) Word processing The best explanation: Application software such as word processors. |
|
| 121. |
A CFG is closed under _________(a) Union(b) Kleene star(c) Concatenation(d) None of the mentioned |
|
Answer» Correct choice is (d) None of the mentioned Easy explanation: CFG is closed under the above mentioned 3 operations. |
|
| 122. |
Which of these does not belong to CFG?(a) Terminal Symbol(b) Non terminal Symbol(c) Start symbol(d) End Symbol |
|
Answer» Right choice is (d) End Symbol The explanation is: CFG consists of terminal non terminal start symbol set of production rules but does not have an end symbol. |
|
| 123. |
Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar?(a) Removing left recursion only(b) Factoring the grammar alone(c) Factoring & left recursion removal(d) None of the mentioned |
|
Answer» Right option is (d) None of the mentioned The explanation: Factoring as well as left recursion removal do not suffice to convert an arbitrary CFG to LL(1) grammar. |
|
| 124. |
Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar?(a) Removing left Recursive alone(b) Factoring the grammar alone(c) Along with removing left recursion we also perform the factoring of the grammar(d) None of the mentioned |
|
Answer» Right option is (d) None of the mentioned To explain: Removing left recursion and factoring the grammar do not suffice to convert an arbitrary CFG to LL(1) grammar. |
|
| 125. |
In an absolute loading scheme which loader function is accomplished by assembler?(a) Re-allocation(b) Allocation(c) Linking(d) Loading |
|
Answer» The correct choice is (a) Re-allocation The best I can explain: Large number variables onto a small number of CPU register. |
|
| 126. |
A bottom up parser generates __________(a) Right most derivation(b) Rightmost derivation in reverse(c) Leftmost derivation(d) Leftmost derivation in reverse |
|
Answer» Right option is (b) Rightmost derivation in reverse Explanation: This corresponds to starting at the leaves of the parse tree also known as shift-reduce parsing. |
|
| 127. |
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» Right option is (c) Errors are passed to the text phase For explanation: Advantage for a valid prefix property. |
|
| 128. |
A bottom up parser generates __________(a) Right most derivation(b) Right most derivation in reverse(c) Left most derivation(d) Left most derivation in reverse |
|
Answer» Correct answer is (b) Right most derivation in reverse The best explanation: This corresponds to starting at the leaves of the parse tree. It can be thought of. A process of reducing the string in question to the start symbol of the grammar. Bottom-up parsing is also known as shift-reduce parsing. |
|
| 129. |
Which of the following strings is NOT in the Kleene star of the language {011, 10, 110}?(a) 01(b) 10(c) 110(d) 10011101 |
|
Answer» Right option is (d) 10011101 The explanation: Every string in the language {011, 10, 110}* has to be formed from zero or more uses of the strings 011, 10, and 110. A string may be used more than once. |
|
| 130. |
Let L1 = {w ∈ {0,1}∗ | w has at least as many occurrences of (110)’s as (011)’s}.Let L2 = { ∈ {0,1}∗ | w has at least as many occurrences of (000)’s as (111)’s}.Which one of the following is TRUE?(a) L1 is regular but not L2(b) L2 is regular |
|
Answer» Right choice is (a) L1 is regular but not L2 The best explanation: L1 is regular let us considering the string 011011011011 . Number of times 011 has occurred is 4 but also its occurrence is 3. Also if the string is ending with 011 we can make a 110 . Now the next string: 110110110110 in this 110 has occurred 4 times and 011 3 times which already satisfy the . |
|
| 131. |
A grammar for a programming language is a formal description of _______________(a) Syntax(b) Semantics(c) Structure(d) Library |
|
Answer» Correct option is (c) Structure Explanation: The grammar clearly indicates which type of structure does a program has. |
|
| 132. |
Which of these features of assembler are Machine-Dependent?(a) Instruction formats(b) Addressing modes(c) Program relocation(d) All of the mentioned |
|
Answer» Right answer is (d) All of the mentioned Explanation: All of these options are features of assembler which are machine dependent. |
|
| 133. |
What is the binary equivalent of the decimal number 368?(a) 10111000(b) 110110000(c) 111010000(d) 111100000 |
|
Answer» Correct choice is (b) 110110000 The best I can explain: 368 binary equivalents is 8=1000 6=0110 3=0011 So 1101101000. |
|
| 134. |
_________ or scanning is the process where the stream of characters making up the source program is read from left to right and grouped into tokens.(a) Lexical Analysis(b) Diversion(c) Modelling(d) None of the mentioned |
|
Answer» The correct option is (a) Lexical Analysis Explanation: Lexical analysis is the process of converting a sequence of characters into a sequence of tokens. |
|
| 135. |
What does a Syntactic Analyser do?(a) Maintain Symbol Table(b) Collect type of information(c) Create parse tree(d) None of the mentioned |
|
Answer» The correct option is (c) Create parse tree For explanation: Syntax analyzer will just create a parse tree. Semantic Analyzer checks the meaning of the string parsed. |
|
| 136. |
A ________ is a string of characters which form a syntactic unit.(a) Lexeme(b) Lex(c) Lexeme & Lex(d) None of the mentioned |
|
Answer» The correct answer is (a) Lexeme The explanation is: A lexeme is a string of characters that form a syntactic unit. |
|
| 137. |
In a bottom up evaluation of a syntax direction definition, inherited attributes can __________(a) Always be evaluated(b) Be evaluated only if the definition is L –attributed(c) Evaluation only done if the definition has synthesized attributes(d) None of the mentioned |
|
Answer» Correct answer is (c) Evaluation only done if the definition has synthesized attributes Explanation: Bottom-up parsing identifies and processes the text’s lowest-level, before its mid-level structures, and the highest-level overall structure to last are left. |
|
| 138. |
Which of the following pairs is the most powerful?(a) SLR, LALR(b) Canonical LR ,LALR(c) SLR canonical LR(d) LALR canonical LR |
|
Answer» Right answer is (c) SLR canonical LR To elaborate: parser algorithm is simple. |
|
| 139. |
A latch is constructed using which two cross coupled?(a) AND OR gates(b) AND gates(c) NAND and NOR gates(d) NAND gates |
|
Answer» Correct option is (d) NAND gates For explanation: It has two inputs and one output. |
|
| 140. |
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» Right answer is (b) Lexical Analysis For explanation: Conversion of characters to tokens. |
|
| 141. |
A synthesized attribute is an attribute whose value at a parse tree node depends on __________(a) Attributes at the siblings only(b) Attributes at parent node only(c) Attributes at children nodes only(d) None of the mentioned |
|
Answer» The correct option is (c) Attributes at children nodes only Explanation: Synthesized attribute’s value depend on children node only. |
|
| 142. |
Shift reduce parsers are __________(a) Top down parser(b) Bottom up parser(c) Maybe both(d) None of the mentioned |
|
Answer» The correct option is (b) Bottom up parser For explanation: This corresponds to starting at the leaves of the parse tree. It can be thought of a process of reducing the string in question to the start symbol of the grammar. Bottom-up parsing is also known as shift-reduce parsing. |
|
| 143. |
Which of the following String can be obtained by the language L = {ai b2i / i >=1}?(a) aaabbbbbb(b) aabbb(c) abbabbba(d) aaaabbbabb |
|
Answer» Correct choice is (a) aaabbbbbb To explain I would say: Above production rule gives suppose if 3 a’s the corresponding b’s are 6 b’s. |
|
| 144. |
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» Correct option is (d) All of the mentioned Explanation: Run time, runtime or execution time is the time during which a program is running (executing). |
|
| 145. |
What is the input of Lex?(a) Set to regular expression(b) Statement(c) Numeric data(d) ASCII data |
|
Answer» The correct option is (a) Set to regular expression Best explanation: Input is a string. |
|
| 146. |
What are the two types of Linear Grammar?(a) Right Linear(b) Left Linear(c) None of the mentioned(d) Right & Left Linear |
|
Answer» Right answer is (d) Right & Left Linear The explanation is: Linear grammar is of 2 types Left and Right Linear Grammar |
|
| 147. |
What is the output of lexical analyzer?(a) A set of regular expression(b) Syntax tress(c) Set of Token(d) String of Characters |
|
Answer» Correct answer is (c) Set of Token Best explanation: Lexical analysis is the process of converting a sequence of characters into a sequence of tokens. |
|
| 148. |
What is the output of a lexical analyzer?(a) Machine Code(b) Intermediate Code(c) Stream of Token(d) Parse Tree |
|
Answer» Correct option is (c) Stream of Token Easy explanation: The output given is in the form of tokens. |
|
| 149. |
Type checking is normally done during ____________(a) Lexical Analysis(b) Syntax Analysis(c) Syntax Directed Translation(d) Code generation |
|
Answer» Right choice is (c) Syntax Directed Translation For explanation: It is the function of Syntax directed translation. |
|
| 150. |
A Compiler has __________ phases.(a) 7(b) 6(c) 8(d) None of the mentioned |
|
Answer» Right choice is (c) 8 For explanation I would say: It has 8 phases. |
|