Explore topic-wise InterviewSolutions in .

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.

1.

Let the class of language accepted by finite state machine be L1 and the class of languages represented by regular expressions be L2 then?(a) L1=L2(c) L1 U L2 = .*(d) L1=L2

Answer» Right option is (d) L1=L2

The best explanation: Finite state machine and regular expression have same power to express a language.
2.

Dynamic linking can cause security concerns because ______________(a) Security is dynamic(b) None of the mentioned(c) Security is dynamic & Cryptographic procedures are not available for dynamic linking(d) Cryptographic procedures are not available for dynamic linking

Answer» The correct option is (d) Cryptographic procedures are not available for dynamic linking

Explanation: Required by the program are linked during run time.
3.

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

Answer» Correct option is (a) ORG instructions

Easiest explanation: ORG segment base register is used to specify the register.
4.

The process manager has to keep track of ___________(a) Status of each program(b) Information to a programmer using the system(c) Status of each program & Information to a programmer using the system(d) None of the mentioned

Answer» Right option is (c) Status of each program & Information to a programmer using the system

The best explanation: Process manager keep track of the status and info about the program.
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

Answer» Right option is (a) Implementation of lexical analysis and syntax analysis is made easier

For explanation I would say: Intermediate code generator receives input from its predecessor phase, semantic analyzer, in the form of an annotated syntax tree.
6.

Assembler is a program that _________(a) Puts programs into memory and executes them(b) Translates the assembly language into machine language(c) Writes in high level language and produces an object program(d) None of the mentioned

Answer» The correct option is (b) Translates the assembly language into machine language

Explanation: An assembler is a program that takes basic computer instructions and converts them into a pattern of bits that the computer’s processor can use to perform its basic operations.
7.

The specific task storage manager performs ____________(a) Allocation/ deal location of programs(b) Protection of storage area assigned to the program(c) Allocation/ deal location of programs & protection of storage area assigned to the program(d) None of the mentioned

Answer» The correct option is (c) Allocation/ deal location of programs & protection of storage area assigned to the program

Explanation: Its basic function is that of the task storage manager.
8.

_________ 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)

Answer» Correct answer is (c) PC (Program Counter)

Easiest explanation: Program Counter keeps track of the next instruction.
9.

A simple two-pass assembler does which of the following in the first pass?(a) It allocates space for the literals(b) Calculates total length of the program(c) Symbol table is built for the symbols and their value(d) All of the mentioned

Answer» The correct option is (d) All of the mentioned

To elaborate: A two-pass assembler. Each pass scans the program, the first pass generates the symbol table and the second pass generates the machine code.
10.

Which of the following is a two-dimensional array?(a) array array[20][20](b) int array[20][20](c) int array[20, 20](d) char array[20]

Answer» The correct option is (b) int array[20][20]

The explanation: Double dimensional arrays are declared in this format.
11.

The average time required to reach a storage location in memory and obtain its contents is called the _____(a) Seek time(b) Turnaround time(c) Access time(d) Transfer time

Answer» Correct choice is (c) Access time

The explanation is: Times used to access the contents.
12.

What is garbage?(a) Unallocated storage(b) Allocated storage whose access paths are destroyed?(c) Allocated storage(d) Uninitialized storage

Answer» Correct option is (b) Allocated storage whose access paths are destroyed?

For explanation I would say: These are more like memory loacations with values whose pointers have been revoked.
13.

If A ∩ B = B, then?(a) A ⊂ B(b) A = ø(c) B ⊂ A(d) B = ø

Answer» Correct choice is (c) B ⊂ A

The explanation: Since A ∩ B = B, hence B ⊂ A.
14.

Which is true for in accessible state?(a) It cannot be reached anytime(b) There is no necessity of the state(c) If control enters no way to come out from the state(d) If control enters FA deads

Answer» The correct answer is (a) It cannot be reached anytime

Explanation: The very meaning of in accessible state is that it cannot be reached at any point of time.
15.

In C programming language, which of the following type of operators have the highest precedence?(a) Relational Operators(b) Equality Operators(c) Logical Operators(d) Arithmetic Operators

Answer» The correct answer is (d) Arithmetic Operators

Explanation: No other operator has  higher precedence than arithmetic operator.
16.

Choose the correct statement.(a) Expressions evaluated at compile time(b) String constants concatenated at compile time(c) None of the mentioned(d) Both of the mentioned

Answer» The correct answer is (d) Both of the mentioned

Easiest explanation: The statements are true.
17.

The average time required to reach a storage location in memory and obtain its contents is called __________(a) Latency time(b) Access time(c) Turnaround time(d) Response time

Answer» The correct answer is (b) Access time

Easy explanation: Access time is the time from the start of one storage device access to the time when the next access can be started.
18.

If A, B and C are any three sets, then A – (B ∪ C) is equal to _____________(a) (A – B) ∪ (A – C)(b) (A – B) ∪ C(c) (A – B) ∩ (A – C)(d) (A – B) ∩ C

Answer» The correct choice is (c) (A – B) ∩ (A – C)

For explanation I would say: it is De’ Morgan law.
19.

A series of statements explaining how the data is to be processed is called _________(a) Assembly(b) Machine(c) COBOL(d) Program

Answer» Right answer is (d) Program

Explanation: A program is a sequence of instructions, written to perform a task by computer. It requires programs to function, typically executing the program’s instructions in a central processor.
20.

The number of proper subsets of the set {1, 2, and 3} is?(a) 8(b) 6(c) 7(d) 5

Answer» Right answer is (b) 6

Easiest explanation: Number of proper subsets of the set {1, 2, 3) = 2^3 – 2 = 6.
21.

Which of the following statements is FALSE?(a) In up-typed languages, values do not have any types & Dynamic languages have no variables types(b) In up-typed languages, values do not have any types(c) Dynamic languages have no variables types(d) None of the mentioned

Answer» Right choice is (c) Dynamic languages have no variables types

The best I can explain: They have dynamically changing types.
22.

Which one of the following is FALSE?(a) Every NFA can be converted to DFA(b) Every subset of a recursively enumerable set is recursive(c) All of the mentioned(d) None of the mentioned

Answer» Right option is (b) Every subset of a recursively enumerable set is recursive

Easiest explanation: Every subset of a recursively enumerable set is recursive.
23.

Which of the following statements is false?(a) Unambiguous grammar has both kind of derivations(b) An LL(1) parser is a top-down parser(c) LALR is more powerful than SLR(d) Ambiguous grammar can’t be LR(k)

Answer» The correct option is (a) Unambiguous grammar has both kind of derivations

Easiest explanation: If a grammar has more than one leftmost (or rightmost) derivation the grammar is ambiguous.
24.

A compiler for a high-level language that runs on one machine and produces code for a different machine is called ___________(a) Optimizing compiler(b) One pass compiler(c) Cross compiler(d) Multipass compiler

Answer» The correct option is (c) Cross compiler

The explanation: A compiler for a high-level language that runs on one machine and produces code for a different machine is called cross compiler.
25.

Pick the operators that associate from the right.(a) ?:(b) +=(c) =(d) All of the mentioned

Answer» Right option is (d) All of the mentioned

To elaborate: Explanation: They are right associative.
26.

A k-bit field can specify any one of __________(a) 3k registers(b) 2k registers(c) K2 registers(d) K3 registers

Answer» The correct option is (b) 2k registers

For explanation I would say: 2k is the answer.
27.

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%

Answer» Right choice is (b) 90%

The explanation is: The answer is 90%.
28.

Recursive descent parsing is an example of ____________(a) Top down parsing(b) Bottom up parsing(c) Predictive parsing(d) None of the mentioned

Answer» Correct choice is (a) Top down parsing

To explain: Top down is the answer.
29.

Consider the machine M:  The language recognized by M is :(a) {w ∈ {a, b}* / every a in w is followed by ex¬actly two b’s}(b) {w ∈ {a, b}* every a in w is followed by at least two b’}(c) {w ∈ {a, b}* w contains the substring ‘abb’}(d) {w ∈ {a, b}* w does not contain ‘aa’ as a substring}

Answer» The correct option is (b) {w ∈ {a, b}* every a in w is followed by at least two b’}

Explanation: We can try some sample strings like aba, abbbabbb.
30.

Which concept of grammar is used in the compiler?(a) Lexical analysis(b) Parser(c) Code generation(d) Code optimization

Answer» Right option is (b) Parser

Best explanation: As the lexical analysis of a grammar takes place in phases hence it is synonymous to parser.
31.

What is the transitional function of an NFA?(a) Q X Σ→Q(b) Q X Σ→2Q(c) Q X Σ→2n(d) Q X Σ→Qn

Answer» The correct option is (b) Q X Σ→2Q

To explain: Let Q be a finite set and let be a finite set of symbols. Also let be a function from Q to 2Q. All the elements of Q a state, the transition function, q0 the initial state and A the set of accepting states.

Then a nondeterministic finite automaton is a 5-tuple < Q,  , q0,  , A >.
32.

Which grammar is not regular?(a) 0^n(b) 0^n 1^n n(c) 0^m 0^n n(d) 0^n 0^n n

Answer» The correct option is (a) 0^n

The best I can explain: According to pumping lemma, is not a regular language. It is the language of the DFA with two states to achieve an even number of 0’s…
33.

Which one is a FALSE statement?(a) There exists a unique DFA for every regular language(b) NFA can always are converted to a PDA(c) Complement of CFL is always recursive(d) Every NDFA can be converted to a DFA

Answer» Right answer is (d) Every NDFA can be converted to a DFA

Easy explanation: Deterministic PDA cannot handle languages or grammars with ambiguity, but NDFA can handle with ambiguous languages as well as context-free grammar. Hence not every Ndfa can be converted to DFA.
34.

Which of the following identity is true?(a) Ɛ + RR* = R* = ɛ + R*R(b) (R1R2)*R1 = R1 (R2R1)*(c) R*R* = R*(d) All of the mentioned

Answer» Right option is (d) All of the mentioned

For explanation I would say: The former Re can be produced from the latter one.
35.

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

Answer» Right choice is (a) The parse tree

Easy explanation: Parse tree is a representation of the derivation.
36.

DAG representation of a basic block allows __________(a) Automatic detection of local common sub expressions(b) Detection of induction variables(c) Automatic detection of loop variant(d) None of the mentioned

Answer» The correct option is (a) Automatic detection of local common sub expressions

For explanation I would say: It detects local sub expression.
37.

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

Answer» The correct option is (d) The language which interacts with the computer using only the binary digits 1 and 0

To explain: 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.
38.

A floating point number that has an O in the MSB of mantissa is said to have __________(a) Overflow(b) Underflow(c) Important number(d) Undefined

Answer» Right answer is (b) Underflow

Explanation: It is an underflow condition.
39.

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

Answer» The correct answer is (c) Flip Flop

Easiest explanation: Flip flop is 1 bit circuit.
40.

The circuit used to store one bit of data is known as_______(a) Register(b) Encoder(c) Decoder(d) Flip Flop

Answer» The correct choice is (d) Flip Flop

To explain I would say: 1 bit circuit is known as Flip Flop.
41.

Suppose that a bus has 16 data lines and requires 4 cycles of 250 nests each to transfer data. The bandwidth of this bus would be 2 Megabytes/sec. If the cycle time of the bus was reduced to 125 nsecs and the number of cycles required for transfer stayed the same what would the bandwidth of the bus?(a) 1 Megabyte/sec(b) 4 Megabytes/sec(c) 8 Megabytes/sec(d) 2 Megabytes/sec

Answer» Right choice is (d) 2 Megabytes/sec

Best explanation: The bandwidth is 2 mb/s.
42.

The string WWR is not recognized by any FSM because _____________(a) An FSM cannot remember arbitrarily large amount of information(b) An FSM cannot fix the midpoint(c) An FSM cannot match W with WR(d) An FSM cannot remember first and last inputs

Answer» The correct choice is (b) An FSM cannot fix the midpoint

To elaborate: Palindromes cannot be recognized by FSM.
43.

An FSM with __________(a) M can be transformed to Numeral relabeling its states(b) M can be transformed to N, merely relabeling its edges(c) Both of the mentioned(d) None of the mentioned

Answer» Right option is (c) Both of the mentioned

The explanation is: The Definition of FSM states that M can be transformed to N by relabeling its states or its edges.
44.

Which of the following is integral data type?(a) void(b) char(c) float(d) double

Answer» Right choice is (b) char

Easy explanation: In c char is integral data type. It stores the ASCII value.
45.

If is a language, and is a symbol, then, the quotient of and, is the set of strings such that is in: is in. Suppose is regular, which of the following statements is true?(a) L/a is always a regular language(b) L/a is not a regular language(c) All of the mentioned(d) None of the mentioned

Answer» The correct choice is (a) L/a is always a regular language

Explanation: We can build a DFA for as such: firstly we get the DFA for: Then, we copy all the states and transitions to the DFA for. However, we mark any state as a final state in if and only if is a final state in.
46.

Which is not true about syntax and semantic parts of a computer language?(a) Semantics is checked mechanically by a computer(b) Semantics is the responsibility of the programmer(c) All of the mentioned(d) None of the mentioned

Answer» Correct option is (d) None of the mentioned

Explanation: Both in terms of semantics is not true.
47.

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

Answer» Right option is (b) type-2 grammar

To explain I would say: Type 2 grammar satisfies this production grammar.
48.

Which type of string is accepted by the following finite automata?(a) All string(b) Null string(c) No string(d) None of the mentioned

Answer» Right answer is (b) Null string

To elaborate: Null strings are not accepted by finite automata.
49.

Floating point representation is used to store ____________(a) Boolean values(b) Whole numbers(c) Real integers(d) Integers

Answer» The correct option is (c) Real integers

Easiest explanation: They are real Integers.
50.

Which of the following identity is wrong?(a) R + R = R(b) (R*)* = R*(c) ƐR = Rɛ = R(d) ØR = RØ = RR*

Answer» Right answer is (d) ØR = RØ = RR*

The best explanation: Regular grammar combined with empty does not give R* instead gives empty.