General
Question 1 |
Which of the following statements is true?
ROM is a Read/Write memory | |
PC points to the last instruction that was executed | |
Stack works on the principle of LIFO | |
All instructions affect the flags |
Question 1 Explanation:
We know that stack works on the principle of LIFO.
Question 2 |
The principle of locality justifies the use of
interrupts | |
DMA | |
Polling | |
Cache Memory |
Question 2 Explanation:
The locality of reference is also known as principle of locality.
→ The things which are used more frequently those are stored in locality of reference.
→ For this purpose we use the cache memory.
→ The things which are used more frequently those are stored in locality of reference.
→ For this purpose we use the cache memory.
Question 3 |
Consider a grammar with the following productions
S → a∝b|b∝c| aB S → ∝S|b S → ∝b b|ab S ∝ → bd b|b
The above grammar is:
Context free | |
Regular | |
Context sensitive | |
LR(k) |
Question 3 Explanation:
S ∝→ [violates context free]
Because LHS must be single non-terminal symbol.
S ∝→ b [violates CSG]
→ Length of RHS production must be atleast same as that of LHS.
Extra information is added to the state by redefining iteams to include a terminal symbol as second component in this type of grammar.
Ex: [A → αβa]
A → αβ is a production, a is a terminal (or) right end marker $, such an object is called LR(k).
So, answer is (D) i.e., LR(k).
Because LHS must be single non-terminal symbol.
S ∝→ b [violates CSG]
→ Length of RHS production must be atleast same as that of LHS.
Extra information is added to the state by redefining iteams to include a terminal symbol as second component in this type of grammar.
Ex: [A → αβa]
A → αβ is a production, a is a terminal (or) right end marker $, such an object is called LR(k).
So, answer is (D) i.e., LR(k).
Question 4 |
Which of the following statements is true?
- I. As the number of entries in a hash table increases, the number of collisions increases.
II. Recursive programs are efficient
III. The worst case complexity for Quicksort is O(n2)
I and II | |
II and III | |
I and IV | |
I and III |
Question 4 Explanation:
Binary search using linked list is not efficient as it will not give O(log n), because we will not be able to find the mid in constant time. Finding mid in linked list takes O(n) time.
Recursive program requires stack for storing the function state. Any recursive program can be rewritten as an iterative one. Advantage of recursion is "less programming effort", while it always lags behind iterative one in terms of performance.
Recursive program requires stack for storing the function state. Any recursive program can be rewritten as an iterative one. Advantage of recursion is "less programming effort", while it always lags behind iterative one in terms of performance.
Question 5 |
Which one of the following statements is true?
Macro definitions cannot appear within other macro definitions in assembly language programs | |
Overlaying is used to run a program which is longer than the address space of computer | |
Virtual memory can be used to accommodate a program which is longer than the address space of a computer | |
It is not possible to write interrupt service routines in a high level language |
Question 5 Explanation:
A macro body can also have further macro definitions. However, these nested macro definitions aren't valid until the enclosing macro has been expanded. That means enclosing macro must have been called before the macros can be called.
Question 6 |
Match the following items

(i) - (b), (ii) - (c), (iii) - (d), (iv) - (a) |
Question 6 Explanation:
Note: Out of syllabus.
Question 7 |
Match the following items

(i) - (d), (ii) - (a), (iii) - (b), (iv) - (c) |
Question 7 Explanation:
Backus Normal Form (BNF) is a notation technique for context free grammars, often used to describe the syntax of languages used in computing.
Yacc (Yet Another Compiler- Compiler) is a computer program for the UNIX operating system. It is a LALR parser generator, generating a parser, the part of a compiler that tries to make syntactic sense of the source code, specially a LALR parser, based on an analytic grammar. Yacc is written in portable C.
Yacc (Yet Another Compiler- Compiler) is a computer program for the UNIX operating system. It is a LALR parser generator, generating a parser, the part of a compiler that tries to make syntactic sense of the source code, specially a LALR parser, based on an analytic grammar. Yacc is written in portable C.
There are 7 questions to complete.
