R546E55-CS25S23026156-questionPaper
R546E55-CS25S23026156-questionPaper
General Aptitude
Q.1 – Q.5 Carry ONE mark Each
Q.1 Despite his initial hesitation, Rehman’s _________ to contribute to the success of
the project never wavered.
(A) ambivalence
(B) satisfaction
(C) resolve
(D) revolve
(A) Kennel
(B) Hammock
(C) Hive
(D) Lair
Q.3 If 𝑃𝑒 𝑥 = 𝑄𝑒 −𝑥 for all real values of 𝑥, which one of the following statements is
true?
(A) 𝑃=𝑄=0
(B) 𝑃=𝑄=1
(C) 𝑃 = 1; 𝑄 = −1
(D) 𝑃
=0
𝑄
Q.4 The paper as shown in the figure is folded to make a cube where each square
corresponds to a particular face of the cube. Which one of the following options
correctly represents the cube?
(A)
(B)
(C)
(D)
Q.5 Let 𝑝1 and 𝑝2 denote two arbitrary prime numbers. Which one of the following
statements is correct for all values of 𝑝1 and 𝑝2 ?
Q.6 Based only on the conversation below, identify the logically correct inference:
“Even if I had known that you were in the hospital, I would not have gone there to
see you”, Ramya told Josephine.
(B) Ramya did not know that Josephine was in the hospital.
(C) Ramya and Josephine were once close friends; but now, they are not.
Q.7 If IMAGE and FIELD are coded as FHBNJ and EMFJG respectively then, which
one among the given options is the most appropriate code for BEACH ?
(A) CEADP
(B) IDBFC
(C) JGIBC
(D) IBCEC
Q.8 Which one of the following options is correct for the given data in the table?
Iteration (i) 0 1 2 3
Input (I) 20 −4 10 15
Output (X) 20 16 26 41
Q.9 In the given figure, PQRS is a square of side 2 cm and PLMN is a rectangle. The
corner L of the rectangle is on the side QR. Side MN of the rectangle passes through
the corner S of the square.
P S
Q L R
(A) 2√2
(B) 2
(C) 8
(D) 4
Q.10 The diagram below shows a river system consisting of 7 segments, marked P, Q, R,
S, T, U, and V. It splits the land into 5 zones, marked Z1, Z2, Z3, Z4, and Z5. We
need to connect these zones using the least number of bridges. Out of the following
options, which one is correct?
Z2 Z3
R
V
P T
Q Z4
Z1 U
S Z5
Q.11 1 2
If 𝐴 = ( ), then which ONE of the following is 𝐴8 ?
2 −1
(A) 25 0
( )
0 25
(B) 125 0
( )
0 125
(C) 625 0
( )
0 625
(D) 3125 0
( )
0 3125
𝑥 1
Q.12 The value of 𝑥 such that 𝑥 > 1, satisfying the equation ∫1 𝑡 ln 𝑡 𝑑𝑡 = 4 is
(A) √𝑒
(B) 𝑒
(C) 𝑒2
(D) 𝑒−1
Q.13 Consider a binary tree 𝑇 in which every node has either zero or two children.
Let 𝑛 > 0 be the number of nodes in 𝑇.
Which ONE of the following is the number of nodes in 𝑇 that have exactly two
children?
(A) 𝑛−2
2
(B) 𝑛−1
2
(C) 𝑛
2
(D) 𝑛+1
2
𝐿2 = 𝐿−1 , 𝑀 = 𝐿8 and 𝑁 = 𝐿2 .
(A) 0
(B) 1
(C) 2
(D) 3
Q.15 Let 𝑃(𝑥) be an arbitrary predicate over the domain of natural numbers.
Q.17 Consider the routing protocols given in List I and the names given in List II:
List I List II
For matching of items in List I with those in List II, which ONE of the following
options is CORRECT?
Q.18 A machine receives an IPv4 datagram. The protocol field of the IPv4 header has the
protocol number of a protocol X.
#include <stdio.h>
int main(){
stringcopy(a, a + 2);
printf("%s\n", a);
return 0;
while(*t)
*s++ = *t++;
(A) 1
(B) 𝑁−1
(C) 𝑁
(D) 2𝑁 − 1
Q.21 Consider the following statements about the use of backpatching in a compiler for
intermediate code generation:
Rule 1: 𝑅 → 𝐴𝐵 {𝐵. 𝑖 = 𝑅. 𝑖 − 1; 𝐴. 𝑖 = 𝐵. 𝑖; 𝑅. 𝑖 = 𝐴. 𝑖 + 1; }
Rule 2: 𝑃 → 𝐶𝐷 {𝑃. 𝑖 = 𝐶. 𝑖 + 𝐷. 𝑖; 𝐷. 𝑖 = 𝐶. 𝑖 + 2; }
Rule 3: 𝑄 → 𝐸𝐹 {𝑄. 𝑖 = 𝐸. 𝑖 + 𝐹. 𝑖; }
(A) Rule 1 is S-attributed and L-attributed; Rule 2 is S-attributed and not L-attributed;
Rule 3 is neither S-attributed nor L-attributed
(C) Rule 1 is neither S-attributed nor L-attributed; Rule 2 is not S-attributed and
is L-attributed; Rule 3 is S-attributed and L-attributed
(D) Rule 1 is S-attributed and not L-attributed; Rule 2 is not S-attributed and
is L-attributed; Rule 3 is S-attributed and L-attributed
Q.23 Consider a network that uses Ethernet and IPv4. Assume that IPv4 headers do not
use any options field. Each Ethernet frame can carry a maximum of 1500 bytes in
its data field. A UDP segment is transmitted. The payload (data) in the UDP
segment is 7488 bytes.
Which ONE of the following choices has the CORRECT total number of fragments
transmitted and the size of the last fragment including IPv4 header?
Q.25 Let 𝐺1 , 𝐺2 be Context Free Grammars (CFGs) and 𝑅 be a regular expression. For a
grammar 𝐺, let 𝐿(𝐺) denote the language generated by 𝐺.
(D) Is 𝐿(𝐺1 ) = ∅?
Q.26 Processes 𝑃1, 𝑃2, 𝑃3, 𝑃4 arrive in that order at times 0, 1, 2, and 8 milliseconds
respectively, and have execution times of 10, 13, 6, and 9 milliseconds respectively.
Shortest Remaining Time First (SRTF) algorithm is used as the CPU scheduling
policy. Ignore context switching times.
Which ONE of the following correctly gives the average turnaround time of the four
processes in milliseconds?
(A) 22
(B) 15
(C) 37
(D) 19
Q.27 An audit of a banking transactions system has found that on an earlier occasion, two
joint holders of account 𝐴 attempted simultaneous transfers of Rs. 10000 each from
account 𝐴 to account 𝐵. Both transactions read the same value, Rs. 11000, as the
initial balance in 𝐴 and were allowed to go through. 𝐵 was credited Rs. 10000 twice.
𝐴 was debited only once and ended up with a balance of Rs. 1000.
Which of the following properties is/are certain to have been violated by the
system?
(A) Atomicity
(B) Consistency
(C) Isolation
(D) Durability
Q.28 Which of the following is/are part of an Instruction Set Architecture of a processor?
Q.29 Which of the following statements regarding Breadth First Search (BFS) and
Depth First Search (DFS) on an undirected simple graph G is/are TRUE?
(B) Every non-tree edge of G with respect to a DFS tree is a forward/back edge.
(C) If (𝑢, 𝑣) is a non-tree edge of G with respect to a BFS tree, then the distances from
the source vertex 𝑠 to 𝑢 and 𝑣 in the BFS tree are within ±1 of each other.
(D) Both BFS and DFS can be used to find the connected components of G.
Q.30 Consider the two lists List I and List II given below:
List I List II
For matching of items in List I with those in List II, which of the following
option(s) is/are CORRECT?
(A) ̅̅̅̅̅
𝑋𝑌
(B) 𝑋̅ + 𝑌̅ + 𝑋𝑌̅
(C) ̅̅̅̅̅
𝑋 𝑌 + 𝑋̅ + 𝑋𝑌̅
(D) 𝑋 + 𝑌̅
Q.32 The following two signed 2’s complement numbers (multiplicand M and
multiplier Q) are being multiplied using Booth’s algorithm:
printf("%d",x);
Q.34 In a 4-bit ripple counter, if the period of the waveform at the last flip-flop is 64
microseconds, then the frequency of the ripple counter in kHz is ________. (Answer
in integer)
Q.35 Suppose the values 10, −4, 15, 30, 20, 5, 60, 19 are inserted in that order into an
initially empty binary search tree. Let 𝑇 be the resulting binary search tree.
The number of edges in the path from the node containing 19 to the root node of 𝑇
is ___________. (Answer in integer)
Q.36 Suppose we are transmitting frames between two nodes using Stop-and-Wait
protocol. The frame size is 3000 bits. The transmission rate of the channel is 2000
bps (bits/second) and the propagation delay between the two nodes is 100
milliseconds. Assume that the processing times at the source and destination are
negligible. Also, assume that the size of the acknowledgement packet is negligible.
Which ONE of the following most accurately gives the channel utilization for the
above scenario in percentage?
(A) 88.23
(B) 93.75
(C) 85.44
(D) 66.67
Q.37 Let 𝐺 be an edge-weighted undirected graph with positive edge weights. Suppose a
positive constant 𝛼 is added to the weight of every edge.
Which ONE of the following statements is TRUE about the minimum spanning
trees (MSTs) and shortest paths (SPs) in 𝐺 before and after the edge weight update?
(B) MSTs need not remain MSTs, and every SP remains an SP.
(C) Every MST remains an MST, and SPs need not remain SPs.
(D) MSTs need not remain MSTs, and SPs need not remain SPs.
Q.38 A meld operation on two instances of a data structure combines them into one single
instance of the same data structure. Consider the following data structures:
P: Unsorted doubly linked list with pointers to the head node and tail node
of the list.
Which ONE of the following options gives the worst-case time complexities for
meld operation on instances of size 𝑛 of these data structures?
Q.39 For a direct-mapped cache, 4 bits are used for the tag field and 12 bits are used to
index into a cache block. The size of each cache block is one byte. Assume that
there is no other information stored for each cache block.
Which ONE of the following is the CORRECT option for the sizes of the main
memory and the cache memory in this system (byte addressable), respectively?
(A) 64 KB and 4 KB
(C) 64 KB and 8 KB
𝑆 → 𝐴𝑎 | 𝑏𝐴𝑐 | 𝑑𝑐 | 𝑏𝑑𝑎
𝐴→𝑑
Q.41 An array 𝐴 of length 𝑛 with distinct elements is said to be bitonic if there is an index
1 ≤ 𝑖 ≤ 𝑛 such that 𝐴[1. . 𝑖] is sorted in the non-decreasing order and 𝐴[𝑖 + 1 . . 𝑛]
is sorted in the non-increasing order.
Which ONE of the following represents the best possible asymptotic bound for the
worst-case number of comparisons by an algorithm that searches for an element in
a bitonic array 𝐴?
(A) Θ(𝑛)
(B) Θ(1)
(C) Θ(log 2 𝑛)
(D) Θ(log 𝑛)
Q.42 Let ℱ be the set of all functions from {1, … , 𝑛} to {0,1}. Define
the binary relation ≼ on ℱ as follows:
Q.43 Given the following Karnaugh Map for a Boolean function 𝐹(𝑤, 𝑥, 𝑦, 𝑧):
(A) 𝑤
̅𝑥̅ 𝑦̅𝑧̅ + 𝑤𝑥̅ 𝑦̅𝑧̅ + 𝑤
̅𝑥̅ 𝑦𝑧̅ + 𝑤𝑥̅ 𝑦𝑧̅ + 𝑥𝑧
(B) 𝑤
̅𝑥̅ 𝑦̅𝑧̅ + 𝑤
̅𝑥̅ 𝑦𝑧̅ + 𝑤𝑥̅ 𝑦𝑧 + 𝑥𝑧
(C) 𝑤
̅𝑥̅ 𝑦̅𝑧̅ + 𝑤𝑥̅ 𝑦̅𝑧̅ + 𝑤𝑥̅ 𝑦̅𝑧 + 𝑥𝑧
(D) 𝑥̅ 𝑧̅ + 𝑥𝑧
Q.45 Consider a stack data structure into which we can PUSH and POP records. Assume
that each record pushed in the stack has a positive integer key and that all keys are
distinct.
We wish to augment the stack data structure with an 𝑂(1) time MIN operation that
returns a pointer to the record with smallest key present in the stack
(A) Keep with every record in the stack, a pointer to the record with the smallest key
below it.
(B) Keep a pointer to the record with the smallest key in the stack.
(C) Keep an auxiliary array in which the key values of the records in the stack are
maintained in sorted order.
(D) Keep a Min-Heap in which the key values of the records in the stack are maintained.
Q.46 Consider the following relational schema along with all the functional dependencies
that hold on them.
R1(A, B, C, D, E): { 𝐷 → 𝐸, 𝐸𝐴 → 𝐵, 𝐸𝐵 → 𝐶}
R2(A, B, C, D): { 𝐴 → 𝐷, 𝐴 → 𝐵, 𝐶 → 𝐴}
(A) R1 is in 3NF
(B) R2 is in 3NF
Q.47 Consider a demand paging system with three frames, and the following page
reference string: 1 2 3 4 5 4 1 6 4 5 1 3 2. The contents of the frames are as follows
initially and after each reference (from left to right):
initially after
- 1* 2* 3* 4* 5* 4 1 6* 4 5 1* 3* 2*
- 1 1 1 1 1 1 1 6 6 6 6 6 2
- - 2 2 4 4 4 4 4 4 4 1 1 1
- - - 3 3 5 5 5 5 5 5 5 3 3
Which one or more of the following could be the page replacement policy/policies
in use?
The resource allocation graph has the following assignment and claim edges.
Q.49 Three floating point numbers 𝑋, 𝑌, and 𝑍 are stored in three registers RX, RY, and
RZ, respectively in IEEE 754 single precision format as given below in
hexadecimal:
(A) 4(𝑋 + 𝑌) + 𝑍 = 0
(B) 2𝑌 – 𝑍 = 0
(C) 4𝑋 + 3𝑍 = 0
(D) 𝑋+𝑌+𝑍 = 0
(A) 𝐴̅ 𝐵 𝐶 + 𝐴 𝐵̅ 𝐶̅ + 𝐴̅ 𝐵̅ 𝐶̅ + 𝐴 𝐵̅ 𝐶 + 𝐴 𝐵 𝐶 = 𝐵 𝐶 + 𝐵̅ 𝐶̅ + 𝐴̅ 𝐵̅
(B) 𝐴 𝐵 + 𝐴̅ 𝐶 + 𝐵 𝐶 = 𝐴 𝐵 + 𝐴̅ 𝐶
(C) (𝐴 + 𝐶) (𝐴̅ + 𝐵) = 𝐴 𝐵 + 𝐴̅ 𝐶
(D) ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
(𝐴 + 𝐵̅ + 𝐷 ̅ ) (𝐶 + 𝐷) (𝐴̅ + 𝐶 + 𝐷 ) (𝐴 + 𝐵 + 𝐷 ̅ ) = 𝐴̅ 𝐷 + 𝐶̅ 𝐷
̅
Q.51 Consider two grammars 𝐺1 and 𝐺2 with the production rules given below:
𝐸→𝑏
𝐺2 : 𝑆 → 𝑖𝑓 𝐸 𝑡ℎ𝑒𝑛 𝑆 | 𝑀
𝑀 → 𝑖𝑓 𝐸 𝑡ℎ𝑒𝑛 𝑀 𝑒𝑙𝑠𝑒 𝑆 | 𝑐
𝐸→𝑏
Q.52 Let Σ = {𝑎, 𝑏, 𝑐}. For 𝑥 ∈ Σ ∗ , and 𝛼 ∈ Σ, let #𝛼 (𝑥) denote the number of
occurrences of 𝛼 in 𝑥.
(A) {𝑎𝑚 𝑏 𝑛 | 𝑚, 𝑛 ≥ 0}
(C) {𝑤 | 𝑤 ∈ {𝑎, 𝑏}∗ , #𝑎 (𝑤) ≡ 2 (mod 7), and #𝑏 (𝑤) ≡ 3 (mod 9)}
Q.53 Consider the database transactions T1 and T2, and data items X and Y. Which of
the schedule(s) is/are conflict serializable?
Transaction T1
Transaction T2
R1(X)
W2(X)
W1(Y)
W2(Y)
R1(X)
COMMIT(T2)
W1(X)
COMMIT(T1)
Which of the following options is/are correct SQL query/queries to retrieve the
names of the students enrolled in course number (i.e., courseno) 1470?
Q.55 Given a computing system with two levels of cache (L1 and L2) and a main
memory. The first level (L1) cache access time is 1 nanosecond (ns) and the “hit
rate” for L1 cache is 90% while the processor is accessing the data from L1 cache.
Whereas, for the second level (L2) cache, the “hit rate” is 80% and the “miss
penalty” for transferring data from L2 cache to L1 cache is 10 ns. The “miss
penalty” for the data to be transferred from main memory to L2 cache is 100 ns.
A 5-stage instruction pipeline has stage delays of 180, 250, 150, 170, and 250,
respectively, in nanoseconds. The delay of an inter-stage latch is 10 nanoseconds.
Q.56 Assume that there are no pipeline stalls due to branches and other hazards. The time
taken to process 1000 instructions in microseconds is __________ . (rounded off to
two decimal places)
Q.57 In a B+- tree where each node can hold at most four key values, a root to leaf path
consists of the following nodes:
A = (49, 77, 83, -), B = (7, 19, 33, 44), C = (20*, 22*, 25*, 26*)
The *-marked keys signify that these are data entries in a leaf.
Assume that a pointer between keys 𝑘1 and 𝑘2 points to a subtree containing keys
in [𝑘1 , 𝑘2 ), and that when a leaf is created, the smallest key in it is copied up into
its parent.
The smallest key value in the parent of the leaf that contains 25* is __________.
(Answer in integer)
Q.58 A computer system supports a logical address space of 232 bytes. It uses two-level
hierarchical paging with a page size of 4096 bytes. A logical address is divided into
a 𝑏-bit index to the outer page table, an offset within the page of the inner page
table, and an offset within the desired page. Each entry of the inner page table uses
eight bytes. All the pages in the system have the same size.
Q.59 Consider the following algorithm someAlgo that takes an undirected graph 𝐺 as
input.
someAlgo(𝐺)
The output of someAlgo(𝑇) for the tree shown in the given figure is
___________. (Answer in integer)
Q.61 An application executes 6.4 × 108 number of instructions in 6.3 seconds. There are
four types of instructions, the details of which are given in the table. The duration
of a clock cycle in nanoseconds is _________. (rounded off to one decimal place)
Instruction type Clock cycles required per Number of instructions
instruction (CPI) executed
Branch 2 2.25 × 108
Load 5 1.20 × 108
Store 4 1.65 × 108
Arithmetic 3 1.30 × 108
#include <stdio.h>
int main(){
int a;
int *ptr;
ptr = &arr[0] + 1;
a = *ptr;
(*ptr)++;
ptr++;
return 0;
#include <stdio.h>
int g(int n) {
return (n+10);
}
int f(int n) {
return g(n*2);
}
int main() {
int sum, n;
sum=0;
for (n=1; n<3; n++)
sum += g(f(n));
printf ("%d", sum);
return 0;
The probability that the roots of the chosen polynomial are equal is __________.
(rounded off to one decimal place)
Q.65 The unit interval (0,1) is divided at a point chosen uniformly distributed over (0,1)
in ℝ into two disjoint subintervals.
The expected length of the subinterval that contains 0.4 is ___________. (rounded
off to two decimal places)