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. A regular language over an alphabet a is one that can be obtained from
a) union
b) concatenation
c) kleene
d) All of the mentioned

View Answer

Answer : d [Reason:] : None.

2. Regular expression {0,1} is equivalent to
a) 0 U 1
b) 0 / 1
c) 0 + 1
d) All of the mentioned

View Answer

Answer : d [Reason:] : All are equivalent to union operation.

3. Precedence of regular expression in decreasing order is
a) * , . , +
b) . , * , +
c) . , + , *
d) + , a , *

View Answer

Answer : a [Reason:] : None.

4. Regular expression Φ* is equivalent to
a) ϵ
b) Φ
c) 0
d) 1

View Answer

Answer : a [Reason:] : None.

5. a? is equivalent to
a) a
b) a+Φ
c) a+ϵ
d) wrong expression

View Answer

Answer : c [Reason:] : Zero or one time repetition of previous character .

6. ϵL is equivalent to
a) ϵ
b) Φ
c) L
d) Lϵ

View Answer

Answer : c,d [Reason:] : None.

7. (a+b)* is equivalent to
a) b*a*
b) (a*b*)*
c) a*b*
d) none of the mentioned

View Answer

Answer : b [Reason:] : None.

8. ΦL is equivalent to
a) LΦ
b) Φ
c) L
d) ϵ

View Answer

Answer : a,b [Reason:] : None.

9. Which of the following pair of regular expression are not equivalent?
a) 1(01)* and (10)*1
b) x(xx)* and (xx)*x
c) (ab)* and a*b*
d) x+ and x*x+

View Answer

Answer : c [Reason:] : (ab)*=(a*b*)*.

10. Consider following regular expression
i) (a/b)* ii) (a*/b*)* iii) ((ϵ/a)b*)*
Which of the following statements is correct
a) i,ii are equal and ii,iii are not
b) i,ii are equal and i,iii are not
c) ii,iii are equal and i,ii are not
d) all are equal

View Answer

Answer : d [Reason:] : All are equivalent to (a+b)*.

Set 2

1. A self-relocating program 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

View Answer

Answer: c [Reason:] A self-relocating program is a program which can perform the relocation itself •A table of information about address sensitive instruction in the program. •Relocating logic that can perform the relocation of the address sensitive instructions.

2. Scissoring enables
a) A part of data to be displayed
b) Entire data to be displayed
c) Full data display on full screen
d) No data to be displayed

View Answer

Answer: a [Reason:] It displays a part of the data.

3. Which of the following can be accessed by transfer vector approach of linking?
a) External data segments
b) External sub-routines
c) Data located in other procedure
d) All of the mentioned

View Answer

Answer: b [Reason:] External subroutines are routines that are created and maintained separately from the program that will be calling them.

4. Relocation bits used by relocating loader are specified by
a) Relocating loader itself
b) Linker
c) Assembler
d) Macro processor

View Answer

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

5. Generation of intermediate code based on a abstract machine model is useful in compilers because
a) Implementation of lexical analysis and syntax analysis is made easier
b) Writing for intermediate code generation
c) Portability of the front end of the compiler
d) None of the mentioned

View Answer

Answer: a [Reason:] Intermediate code generator receives input from its predecessor phase, semantic analyzer, in the form of an annotated syntax tree.

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

View Answer

Answer: a [Reason:] Non reusable models can be used once for a purpose they can’t be modified and used again.

7. An intermediate code form is
a) Postfix Notation
b) Syntax Trees
c) Three address
d) All of the mentioned

View Answer

Answer: d [Reason:] All the specified options are type of intermediate code form.

8. The best way to compare the different implementations of symbol table is to compare the time required to
a) Add a new name
b) Make an enquiry
c) Add a new name and make an enquiry
d) All of the mentioned

View Answer

Answer: d [Reason:] These are the different implementations of the symbol table as mentioned above.

Set 3

1. Generally Dynamic RAM is used as main memory in a computer system as it______
a) Consumes less power
b) Has higher speed
c) Has lower cell density
d) Needs refreshing circuitry

View Answer

Answer: b [Reason:] Because of higher speed it is Dynamic.

2. Write Through technique is used in which memory for updating the data _____
a) Virtual memory
b) Main memory
c) Auxiliary memory
d) Cache memory

View Answer

Answer: d [Reason:] The answer is cache memory.

3. Cache memory acts between_______
a) CPU and RAM
b) RAM and ROM
c) CPU and Hard Disk
d) None of the mentioned

View Answer

Answer: a [Reason:] it acts between CPU and RAM.

4. The circuit used to store one bit of data is known as ______
a) Encoder
b) OR gate
c) Flip Flop
d) Decoder

View Answer

Answer: c [Reason:] Flip flop is 1 bit circuit.

5. Von Neumann architecture is ______
a) SISD
b) SIMD
c) MIMD
d) MISD

View Answer

Answer: a [Reason:] It is single instruction single data.

6. In a vectored interrupt.
a) The branch address is assigned to a fixed location in memory
b) The interrupting source supplies the branch information to the processor through an interrupt vector
c) The branch address is obtained from a register in the processor
d) None of the mentioned

View Answer

Answer: b [Reason:] It branches to process the interrupt.

7. In a memory-mapped I/O system, which of the following will not be there?
a) LDA
b) IN
c) ADD
d) OUT

View Answer

Answer: a [Reason:] There is no LDA.

8. If memory access takes 20 ns with cache and 110 ns without it, then the ratio (cache uses a 10 ns memory) is _____
a) 93%
b) 90%
c) 88%
d) 87%

View Answer

Answer: b [Reason:] The answer is 90%.

9. The addressing mode used in an instruction of the form ADD X Y, is _____
a) Absolute
b) Indirect
c) Index
d) None of the mentioned

View Answer

Answer: c [Reason:] This addressing mode is indexed.

10. _________ register keeps track of the instructions stored in program stored in memory.
a) AR (Address Register)
b) XR (Index Register)
c) PC (Program Counter)
d) AC (Accumulator)

View Answer

Answer: c [Reason:] Program Counter keeps track of the next instruction.

Set 4

1. Input to code generator
a) Source code
b) Intermediate code
c) Target code
d) All of the mentioned

View Answer

Answer: b [Reason:] Intermediate code is the input to the code generator.

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

View Answer

Answer: c [Reason:] Synthesized attribute’s value depend on children node only.

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

View Answer

Answer: c [Reason:] 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.

4. The graph that shows basic blocks and their successor relationship is called
a) DAG
b) Flow Chart
c) Control Graph
d) Hamilton graph

View Answer

Answer: b [Reason:] Flow chart shows basic blocks.

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

View Answer

Answer: a [Reason:] Lexical analysis is the process of converting a sequence of characters into a sequence of tokens.

6. The output of a lexical analyzer is
a) Machine code
b) Intermediate code
c) A stream of tokens
d) A parse tree

View Answer

Answer: c [Reason:] The output of lexical analyser is output token.

7. _____________ is a graph representation of a derivation
a) The parse tree
b) Oct tree
c) Binary tree
d) None of the mentioned

View Answer

Answer: a [Reason:] Parse tree is a representation of the derivation.

8. Which of the following symbols table implementation is based on the property of locality of reference?
a) Hash Table
b) Search tree
c) Self organizing list
d) Linear list

View Answer

Answer: c [Reason:] Self Organizing list is based on locality of reference.

9. Which one of the following is a top-down parser?
a) Recursive Descent parser
b) Operator precedence parser
c) An LR(k) parser
d) An LALR(k) parser

View Answer

Answer: a [Reason:] Recursive Descent parsing is LL (1) parsing which is top down parsing.

10. Assume that the SLR parser for a grammar G has N1 states and the LALR parser for G has n2 states. Hence which one is true?
a) N1 is necessarily less than n2
b) N1 is necessarily equal to n2
c) N1 is necessarily greater than n2
d) None of the mentioned

View Answer

Answer: b [Reason:] SLR parser which has N1 states is equal to LALR parser with N2 states.

Set 5

1. Which of the following strings is not generated by the following grammar?
S → SaSbS|ε
a) aabb
b) abab
c) aababb
d) aaabbb

View Answer

Answer: d [Reason:] S->aSbS putting S-> € and then S->SaSbS S->aSaSaSbSbSbS putting S->SaSbS S->aaabbb putting S->€.

2. Regular expressions can be used only for values of type string and number.
a) True
b) False

View Answer

Answer: b [Reason:] RE is used for all types of string and numbers.

3. What is the Regular Expression Matching Zero or More Specific Characters
a) x
b) #
c) *
d) &

View Answer

Answer: c [Reason:] Zero or Specific Expression matching can be done only by a single character that is*.

4. All __________ are automatically treated as regular expressions.
a) Programmatic description
b) Window
c) Win Object
d) Collection

View Answer

Answer: a [Reason:] It is seen that programmatic description are treated as regular expression.

5. Regular Expressions can be used with XML checkpoints.
a) True
b) False

View Answer

Answer: a [Reason:] XML checkpoints employ RE.

6. The production Grammar is {S->aSbb,S->abb} is
a) Type-3 grammar
b) Type-2 grammar
c) Type-1 grammar
d) Type-0 grammar

View Answer

Answer: b [Reason:] As per the definition of type-2 grammar.

7. Regular expression (x/y)(x/y) denotes the set
a) {xy,xy}
b) {xx,xy,yx,yy}
c) {x,y}
d) {x,y,xy}

View Answer

Answer: b [Reason:] From first part if we take x then from the latter part x then it forms xx From first part if we take x then from the latter part y then it forms xy From first part if we take y then from the latter part x then it forms yx From first part if we take y then from the latter part y then it forms yy.

8. Regular expression x/y denotes the set
a) {x,y}
b) {xy}
c) {x}
d) {y}

View Answer

Answer: a [Reason:] Because either x or y can be selected.

9. The regular expressions denote zero or more instances of an x or y is
a) (x+y)
b) (x+y)*
c) (x* + y)
d) (xy)*

View Answer

Answer: b [Reason:] For instances of x or y the exp is x+y and both can zero or more times than (x+y)*.

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