Match-the-Following

Question 1

The correct matching for the following pairs is

         A. Activation record	   1. Linking loader
         B. Location counter	   2. Garbage collection
         C. Reference counts	   3. Subroutine call
         D. Address relocation	   4. Assembler 
A
A – 3 B – 4 C – 1 D – 2
B
A – 4 B – 3 C – 1 D – 2
C
A – 4 B – 3 C – 2 D – 1
D
A – 3 B – 4 C – 2 D – 1
Question 1 Explanation: 
Each time a subroutine is called its activation record is created.
An assembler uses location counter value to give address to each instruction which is needed for relative addressing as well as for jump labels.
Reference count is used by garbage collector to clear the memory whose reference count be comes 0.
Linker loader is a loader which can load several compiled codes and link them together into a single executable. Thus it needs to do relocation of the object codes.
Question 2

The correct matching for the following pairs is

(A) All pairs shortest path          (1) Greedy
(B) Quick Sort                       (2) Depth-First search
(C) Minimum weight spanning tree     (3) Dynamic Programming
(D) Connected Components             (4) Divide and and Conquer 
A
A – 2 B – 4 C – 1 D – 3
B
A – 3 B – 4 C – 1 D – 2
C
A – 3 B – 4 C – 2 D – 1
D
A – 4 B – 1 C – 2 D – 3
Question 2 Explanation: 
All pairs shortest path - Dynamic Programming
Quick sort - Divide and Conquer
Minimum weight Spanning tree - Greedy
Connected components - Depth-First search
Question 3

The correct matching for the following pairs is

(A) DMA I/O                    (1) High speed RAM
(B) Cache                      (2) Disk
(C) Interrupt I/O              (3) Printer
(D) Condition Code Register    (4) ALU 
A
A – 4 B – 3 C – 1 D – 2
B
A – 2 B – 1 C – 3 D – 4
C
A – 4 B – 3 C – 2 D – 1
D
A – 2 B – 3 C – 4 D – 1
Question 3 Explanation: 
DMA I/O → Disk
Cache → High speed RAM
Interrupt I/O → Printer
Condition code register → ALU
Question 4

The correct matching for the following pairs is

(A) Disk Scheduling        (1) Round robin
(B) Batch Processing       (2) SCAN
(C) Time sharing           (3) LIFO
(D) Interrupt processing   (4) FIFO  
A
A – 3 B – 4 C – 2 D – 1
B
A – 4 B – 3 C – 2 D – 1
C
A – 2 B – 4 C – 1 D – 3
D
A – 3 B – 4 C – 3 D – 2
Question 4 Explanation: 
Disk scheduling - SCAN
Batch processing - FIFO
Time sharing - Round Robin
Interrupt processing - LIFO
Question 5

Give the correct matching for the following pairs:

            A. O(log n)     1. Selection sort
            B. O(n)         2. Insertion sort
            C. O(nlog n)    3. Binary search
            D. O(n2)        4. Merge sort   
A
A – R B – P C – Q D – S
B
A – R B – P C – S D – Q
C
A – P B – R C – S D – Q
D
A – P B – S C – R D – Q
Question 5 Explanation: 
Binary search = O(log n)
Selection = O(n)
Merge sort = O(n log n)
Insertion sort = O(n2)
Question 6

Listed below are some operating system abstractions (in the left column) and the hardware components or mechanism (in the right column) that they are abstractions of. Which of the following matching of pairs is correct?

    A. Thread                      1. Interrupt
    B. Virtual address space       2. Memory
    C. File system                 3. CPU
    D. Signal                      4. Disk 
A
(A) – 2 (B) – 4 (C) – 3 (D) - 1
B
(A) – 1 (B) – 2 (C) – 3 (D) – 4
C
(A) – 3 (B) – 2 (C) – 4 (D) - 1
D
(A) – 4 (B) – 1 (C) – 2 (D) – 3
Question 6 Explanation: 

⇒ Threads are handled by CPU.
⇒ Virtual address is a memory type.
⇒ File system is used to manage the disk.
⇒ Interrupt is a signal.
Question 7

The most appropriate matching for the following pairs

    X: Indirect addressing            1 : Loops
    Y: Immediate addressing           2 : Pointers
    Z: Auto decrement addressing      3: Constants  

is

A
X – 3 Y – 2 Z - 1
B
X – 1 Y – 3 Z - 2
C
X – 2 Y – 3 Z - 1
D
X – 3 Y – 1 Z - 2
Question 7 Explanation: 
Indirect addressing:
Indirect addressing means that the address of the data is held in an intermediate location so that the address is first 'looked up' and then used to locate the data itself.
Immediate addressing:
Immediate Addressing. An immediate operand has a constant value or an expression. When an instruction with two operands uses immediate addressing, the first operand may be a register or memory location, and the second operand is an immediate constant.
Auto increment or decrements can be one by using loops.
Question 8

The most appropriate matching for the following pairs

    X: m=malloc(5); m= NULL;        1: using dangling pointers
    Y: free(n); n->value=5;         2: using uninitialized pointers
    Z: char *p; *p = ’a’;           3. lost memory  

is:

A
X – 1 Y – 3 Z – 2
B
X – 2 Y – 1 Z – 3
C
X – 3 Y – 2 Z – 1
D
X – 3 Y – 1 Z – 2
Question 8 Explanation: 
X → m = NULL will results the loss of memory.
Y → n is pointer to invalid memory, a making it as a dangling pointer.
Z → p is not initialized.
p = malloc (size of(char))p = malloc (size of(char)); should have been used before assigning 'aa' to ∗p.
Question 9

The most appropriate matching for the following pairs

          X: depth first search            1: heap
          Y: breadth-first search          2: queue
          Z: sorting                       3: stack  

is

A
X – 1 Y – 2 Z – 3
B
X – 3 Y – 1 Z – 2
C
X – 3 Y – 2 Z – 1
D
X – 2 Y – 3 Z – 1
Question 9 Explanation: 
Stack is used in depth first search.
Queue is used in breadth-first search.
Heap is used in heap.
Question 10

Which is the most appropriate match for the items in the first column with the items in the second column

X. Indirect Addressing        I. Array implementation
Y. Indexed Addressing         II. Writing re-locatable code
Z. Base Register Addressing   III. Passing array as parameter 
A
(X, III) (Y, I) (Z, II)
B
(X, II) (Y, III) (Z, I)
C
(X, III) (Y, II) (Z, I)
D
(X, I) (Y, III) (Z, II)
Question 10 Explanation: 
⇒ Array implementation can be done by Indexed addressing.
⇒ Writing relocatable code can be done by Base Register addressing by changing the value of Base Register.
⇒ While passing an array as parameter we use pointer and hence can use Indirect addressing.
Question 11

Match the following iterative methods for solving algebraic equations and their orders of convergence.

A
1-R, 2-S, 3-P, 4-Q
B
1-S, 2-R, 3-Q, 4-P
C
1-S, 2-Q, 3-R, 4-P
D
1-S, 2-P, 3-Q, 4-R
Question 11 Explanation: 
Note: Out of syllabus.
There are 11 questions to complete.

Access quiz wise question and answers by becoming as a solutions adda PRO SUBSCRIBER with Ad-Free content

Register Now

If you have registered and made your payment please contact solutionsadda.in@gmail.com to get access