0% found this document useful (0 votes)
18 views14 pages

Gate 2021 Cs Engineering Quesitons 431737642736402

The document contains a series of questions and problems related to general aptitude and technical knowledge, including mathematics, programming, and logical reasoning. It features multiple-choice questions that test the reader's understanding of various concepts, such as ratios, programming output, CPU scheduling, and data structures. Additionally, it includes passages related to the effects of music on exercise and learning, along with questions that require inference and analysis.

Uploaded by

puhazh03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views14 pages

Gate 2021 Cs Engineering Quesitons 431737642736402

The document contains a series of questions and problems related to general aptitude and technical knowledge, including mathematics, programming, and logical reasoning. It features multiple-choice questions that test the reader's understanding of various concepts, such as ratios, programming output, CPU scheduling, and data structures. Additionally, it includes passages related to the effects of music on exercise and learning, along with questions that require inference and analysis.

Uploaded by

puhazh03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

byjusexamprep.

com

1
byjusexamprep.com
SECTION: GENERAL APTITUDE

1. Gauri said that she can play the keyboard ______ 2 2


 1  3
6. If  x −  −  x −  = x + 2 , then the value of x
her sister.  2  2
A. as worse as B. as better as is :
C. as nicest as D. as well as A. 6 B. 4
2. If θ is the angle, in degrees, between the longest C. 2 D. 8
diagonal of the cube and any one of the edges of the
cube, then, cos θ = 7.
1 1
A. B.
3 2

1 3
C. D.
2 2

3. Six students P, Q, R, S, T and U, with distinct


heights, compare their heights and make the
following observations.
A transparent square sheet shown above is folded
Observation I: S is taller than R.
along the dotted line. The folded sheet will look like
Observation II: Q is the shortest of all.
_______ .
Observation III: U is taller than only one student.
Observation IV: T is taller than S but is not the
tallest.
The number of students that are taller than R is the A. B.

same as the number of students shorter than


______ .
A. T B. P
C. S D. R
4. Pen : Write :: Knife : _____
C. D.
Which one of the following options maintains a
similar logical relation in the above?
A. Cut B. Vegetables
C. Sharp D. Blunt
8. Listening to music during exercise improves

5. The number of students in three classes is in the exercise performance and reduces discomfort.

ratio 3:13:6. If 18 students are added to each class, Scientists researched whether listening to music

the ratio changes to 15:35:21. while studying can help students learn better and

The total number of students in all the three classes the results were inconclusive. Students who needed

in the beginning was: external stimulation for studying fared worse while

A. 88 B. 110 students who did not need any external stimulation

C. 22 D. 66 benefited from music.


Which one of the following statements is the
CORRECT inference of the above passage?

2
byjusexamprep.com

A. Listening to music has a clear positive effect on


physical exercise. Music has a positive effect on
learning only in some students.
C.
B. Listening to music has no effect on learning and
a positive effect on physical exercise.
C. Listening to music has a clear positive effect both
on physical exercise and on learning.
D. Listening to music has a clear positive effect on
learning in all students. Music has a positive effect D.
only in some students who exercise.
9.

10.

400
296 300
300 240
200 210
200
100
100
0
Year 1 Year2 Year 3
A jigsaw puzzle has 2 pieces. One of the pieces is
Number of units
shown above. Which one of the given options for the
missing piece when assembled will form a The number of units of a product sold in three

rectangle? The piece can be moved, rotated or different years and the respective net profits are

flipped to assemble with the above piece. presented in the figure above. The cost/unit in Year
3 was ₹ 1, which was half the cost/unit in Year 2.
The cost/unit in Year 3 was one-third of the cost/unit
in Year 1. Taxes were paid on the selling price at
A. 10%, 13% and 15% respectively for the three
years. Net profit is calculated as the difference
between the selling price and the sum of cost and
taxes paid in that year.
The ratio of the selling price in Year 2 to the selling
price in Year 3 is _______ .
B.
A. 4 : 3 B. 1 : 1
C. 1 : 2 D. 3 : 4

3
byjusexamprep.com

TECHNICAL

1. Consider the following ANSI C program. q = q + y->f1;


#include <stdio.h> } else {
int main(){ p = p + y->f2:
int arr [4] [5] ; q = q + x + 3:
int i, j; }
for (i=0; i<4; i++){ }
for (j=0; j<5; j++){ Assume that the variable y points to a struct
arr[i][j] = 10*i + j; (allocated on the heap) containing two fields f1 and
} f2, and the local variables x, y, z, p, q, and i are
} allotted registers. Common sub-expression
printf(“%d”, *(arr[1] + 9)); elimination (CSE) optimization is applied on the
return 0; code. The number of addition and dereference
} operations (of the form y->f1 or y->f2 ) in the
What is the output. of the above program? optimized code, respectively, are:
A. 14 B. 24 A. 303 and 102 B. 303 and 2
C. 30 D. 20 C. 403 and 102 D. 203 and 2
2. Which of the following statement(s) is/are correct in
the context of CPU scheduling? 5. Consider a Boolean function f(w, x, y, z) such that
A. Turnaround time includes waiting time. f(w, 0, 0, z) = 1
B. Round-robin policy can be used even when the f(1, x, 1, z) = x + z
CPU time required by each of the processes is not f(w, 1, y, z) = wz + y
known apriori. The number of literals in the minimum sum-of-
C. Implementing preemptive scheduling needs products expression of f is _____ .
hardware support. 6. Let S be the following schedule of operations of
3. Consider the following sets, where n ≥ 2: three transactions T1, T2 and T3 in a relational
S1: Set of all n × n matrices with entries from the database system:
set {a, b, c} R2(Y), R1(X), R3(Z), R1(Y), W1(X), R2(Z), W2(Y),
S2: Set of all functions from the set {0, 1, 2, …, n2 R3(X), W3(Z)
– 1} to the set {0,1,2} Consider the statements P and Q below:
Which of the following choice(s) is/are correct? P: S is conflict-serializable.
A. There exists a bijection from S1 to S2. Q: If T3 commits before T1 finishes, then S is
B. There exists a surjection from S1 to S2. recoverable.
C. There does not exist an injection from S1 to S2. Which one of the following choices is correct?
D. There does not exist a bijection from S1 to S2. A. Both P and Q are true.
4. Consider the following ANSI C code segment: B. P is false and Q is true.
z = x + 3 + y->f1 + y->f2; C. Both P and Q are false.
for (i = 0; i< 200; i = i + 2){ D. P is true and Q is false.
if (2 >i) {
p = p + x + 3:

4
byjusexamprep.com

10. Consider a network using the pure ALOHA medium


7. Consider the following ANSI C program. access control protocol, where each frame is of
#include <stdio.h> length 1,000 bits. The channel transmission rate is
int foo(int x, int y, int q) 1 Mbps (= 106 bits per second). The aggregate
{ number of transmissions across all the nodes
if ((x <= 0) && (y <= 0)) (including new frame transmissions and
return q; retransmitted frames due to collisions) is modelled
if (x <= 0) as a Poisson process with a rate of 1,000 frames per
return foo(x, y-q, q); second. Throughput is defined as the average
if (y <= 0) number of frames successfully transmitted per
return foo(x-q, y, q); second. The throughput of the network (rounded to
return foo(x, y–q, q) + foo(x-q, y, q); the nearest integer) is ______.
} 11. Let S be a set consisting of 10 elements. The
int main() number of tuples of the form (A, B) such that A and
{ B are subsets of S, and A ⊆ B is ______.
int r = foo(15,15,10); 12. Consider the following ANSI C function:
printf(“%d”, r); int SomeFunction(int x, int y)
return 0; {
} if ((x == 1) l l (y == 1)) return 1;
The output of the program upon execution is ______ if (x == y) return x;
8. In a directed acyclic graph with a source vertex s, if (x > y) return SomeFunction(x – y, y);
the quality-score of a directed path is defined to be if (y > x) return SomeFunction(x, y – x);
the product of the weights of the edges on the path. }
Further, for a vertex v other than s, the quality- The value returned by SomeFunction(15, 255) is
score of v is defined to be the maximum among the ______
quality-scores of all the paths from s to v. The 13. Let G be a connected undirected weighted graph.
quality-score of s is assumed to be 1. Consider the following two statements.
S1 : There exists a minimum weight edge in G which
is present in every minimum spanning tree of G.
S2 : If every edge in G has distinct weight, then G
has a unique minimum spanning tree.
Which one of the following options is correct?
A. S1 is true and S2 is false.
B. S1 is false and S2 is true.
The sum of the quality-scores of all the vertices in
C. Both S1 and S2 are true.
the graph shown above is _____ .
D. Both S1 and S2 are false.
9. Let H be a binary min-heap consisting of n elements
implemented as an array. What is the worst case
14. For constants a ≥ 1 and b > 1, consider the following
time complexity of an optimal algorithm to find the
recurrence defined on the non-negative integers:
maximum element in H ?
n
A. Θ(n) B. Θ(1) T ( n) = a  T   + f ( n)
b
C. Θ(log n) D. Θ(n log n)

5
byjusexamprep.com

Which one of the following options is correct about P → QR


the recurrence T(n) ? RS → T

A. f(n) is (
O nlogb ( a )− ) for some ∈> 0, then T(n) is Which of the following functional dependencies can
be inferred from the above functional
 n( log b ( a )
). dependencies?
A. PS → T B. PS → Q
n
B. If f(n) is , then T(n) is  ( log 2 (n) ) . C. P → R D. R → T
log 2 (n)
19. Consider the cyclic redundancy check (CRC) based

C. If f(n) is  n ( log b ( a )
) , then T(n) is  ( n log b ( a )
). error detecting scheme having the generator
polynomial X3 + X + 1. Suppose the message
D. If f(n) is n log2(n), then T(n) is  ( n log 2 (n) ) . m4m3m2m1m0 = 11000 is to be transmitted. Check
bits c2c1c0 are appended at the end of the message

15. Choose the correct choice(s) regarding the following by the transmitter using the above CRC scheme. The

propositional logic assertion S: transmitted bit string is denoted by

S : ((P ∧ Q) → R) → ((P ∧ Q) → (Q → R)) m4m3m2m1m0c2c1c0. The value of the checkbit

A. S is neither a tautology nor a contradiction. sequence c2c1c0is

B. S is a tautology. A. 111 B. 100

C. S is a contradiction. C. 101 D. 110

D. The antecedent of S is logically equivalent to the 20. If x and y are two decimal digits and (0.1101)2 =

consequent of S. (0.8xy5)10, the decimal value of x + y is _______.

16. Consider a computer system with DMA support. The 21. Consider a complete binary tree with 7 nodes. Let A

DMA module is transferring one 8-bit character in denote the set of first 3 elements obtained by

one CPU cycle from a device to memory through performing Breadth-First Search (BFS) starting from

cycle stealing at regular intervals. Consider a 2 MHZ the root. Let B denote the set of first 3 elements

processor. If 0.5% processor cycles are used for obtained by performing Depth-First Search (DFS)

DMA, the data transfer rate of the device is _______ starting from the root.

bits per second. The value of |A – B| is _________.

17. Consider the following augmented grammar with 22. Let L1 be a regular language and L2 be a context-

{#, @, <, >, a, b, c} as the set of terminals. free language. Which of the following languages

S′ → S is/are context-free?

S →S#cS (
A. L1  L 2  L 2 )
S → SS
S → S@ B. L1  L 2

S →< S >
( ) (
C. L1  L 2  L1  L 2 )
S→a
S→b D. L1  L 2

S→c 23. Consider the following ANSI C program:


Let I0 = CLOSURE({S′ → •S}). The number items int main() {
in the set GOTO(GOTO(I0,<), <) is ________ . Integer x;
18. Suppose the following functional dependencies hold return 0;
on a relation U with attributes P, Q R, S, and T: }

6
byjusexamprep.com

Which one of the following phases in a seven-phase 28. Consider a three-level page table to translate a 39-
C compiler will throw an error? bit virtual address to a physical address as shown
A. Lexical analyzer below.
B. Machine dependent optimizer
C. Semantic analyzer
D. Syntax analyzer
24. Consider the following two statements about regular
languages:
S1: Every infinite regular language contains an The page size is 4K8 (1KB = 210 bytes) and page
undecidable language as a subset. table entry size at every level is 8 bytes. A process
S2: Every finite language is regular. P is currently using 2GB (1GB = 2 30 bytes) virtual
Which one of the following choices is correct? memory which is mapped to 2GB of physical
A. Only S2 is true. B. Both S1 and S2 are true. memory. The minimum amount of memory required
C. Neither S1 nor S2 is true. D. for the page table of P across all levels is _______
Only S1 is true. KB.
25. Suppose that f : R → R is a continuous function on 29. Consider the three-way handshake mechanism
the interval [-3, 3] and a differentiable function in followed during TCP connection establishment
the interval (-3, 3) such that for every x in the between hosts P and Q. Let X and Y be two random
interval, f′(x) ≤ 2. If f(-3) = 7, then f(3) is at most 32-bit starting sequence numbers chosen by P and
________ . Q respectively. Suppose P sends a TCP connection
26. Consider the following statements S1 and S2 about request message to Q with a TCP segment having
the relational data model: SYN bit = 1, SEQ number = X, and ACK bit = 0.
S1: A relation scheme can have at most one foreign Suppose Q accepts the connection request. Which
key. one of the following choices represents the
S2: A foreign key in a relation scheme R cannot be information present in the TCP segment header that
used to refer to tuples of R. is sent by Q to P?
Which one of the following choices is correct? A. SYN bit = 1, SEQ number = Y, ACK bit = 1, ACK
A. S1 is false and S2 is true. number = X+1, FIN bit = 0
B. S1 is true and S2 is false. B. SYN bit = 0, SEQ number = X+1, ACK bit = 0,
C. Both S1 and S2 are false. ACK number = Y, FIN bit = 1
D. Both S1 and S2 are true. C. SYN bit = 1, SEQ number = X+1, ACK bit = 0,
27. For a string w, we define wR to be reverse of w. For ACK number = Y, FIN bit = 0
example, if w = 01101 then wR = 10110. Which of D. SYN bit = 1, SEQ number = Y, ACK bit = 1, ACK
the following languages is/are context-free? number = X, FIN bit = 0
A. {wwRxxR | w, x ∈ {0, 1}*} 30. Consider a computer network using the distance
B. {wxwRxR | w, x ∈ {0, 1}*} vector routing algorithm in its network layer. The
C. {wxwR | w, x ∈ {0, 1}*} partial topology of the network is as shown below.
D. {wxxRwR | w, x ∈ {0, 1}*}

7
byjusexamprep.com

The objective is to find the shortest-cost path from


the router R to routers P and Q. Assume that R does
The number of strings of length 8 accepted by the
not initially know the shortest routes to P and Q.
above automaton is ______ .
Assume that R has three neighbouring routers
33. Consider the following multi-threaded code segment
denoted as X, Y, and Z. During one iteration, R
(in a mix of C and pseudocode), invoked by two
measures its distance to its neighbours X, Y, and Z
processes P1 and P2, and each of the processes
as 3, 2, and 5, respectively. Router R gets routing
spawns two threads T1 and T2:
vectors from its neighbours that indicate that the
int x = 0; // global
distance to router P from routers X, Y, and Z are 7,
Lock L1; // global
6, and 5, respectively. The routing vector also
main() {
indicates that the distance to router Q from routers
create a thread to execute foo(); // Thread T1
X, Y, and Z are 4, 6, and 8, respectively. Which of
create a thread to execute foo(); // Thread T2
the following statement(s) is/are correct with
wait for the two threads to finish execution;
respect to the new routing table of R, after updation
print (x);}
during this iteration?
foo() {
A. The distance from R to P will be stored as 10.
int y = 0;
B. The next hop router for a packet from R to P is Y.
Acquire L1;
C. The next hop router for a packet from R to Q is
x = x + 1;
Z.
y = y + 1;
D. The distance from R to Q will be stored as 7.
Release L1;
31. For two n-dimensional real vectors P and Q, the
print (y);}
operation s(P, Q) is defined as follows:
Which of the following statement(s) is / are correct?
n
s (P, Q ) =  (P i  Q i)
i=1
A. At least one of P1 and P2 will print the value of x
as 4.
Let ℒ be a set of 10-dimensional non-zero real
B. At least one of the threads will print the value of
vectors such that for every pair of distinct vectors
y as 2.
P, Q ∈ℒ, s(P, Q) = 0. What is the maximum
C. Both T1 and T2, in both the processes, will print
cardinality possible for the set ℒ?
the value of y as 1.
A. 11 B. 9
D. Both P1 and P2 will print the value of x as 2.
C. 10 D. 100
34. Consider the following directed graph:
32. Consider the following deterministic finite
automaton (DFA).

8
byjusexamprep.com

38. What is the worst-case number of arithmetic


operations performed by recursive binary search on
a sorted array of size n?

A. Θ(n2) B. Θ( n )
C. Θ(n) D. Θ(log2(n))

39. Suppose we want to design a synchronous circuit


Which of the following is/are correct about the that processes a string of 0’s and 1’s. Given a string,
graph? it produces another string by replacing the first 1 in
A. The graph does not have a strongly connected any subsequence of consecutive 1’s by a 0. Consider
component. the following example.
B. The graph does not have a topological order. Input sequence: 00100011000011100
C. A depth-first traversal starting at vertex S Output sequence: 00000001000001100
classifies three directed edges as back edges. A Mealy Machine is a state machine where both the
D. For each pair of vertices u and v, there is a next state and the output are functions of the
directed path from u to v. present state and the current input.
35. For a given biased coin, the probability that the The above mentioned circuit can be designed as a
outcome of a toss is a head is 0.4. This coin is tossed two-state Mealy machine. The states in the Mealy
1,000 times. Let X denote the random variable machine can be represented using Boolean values 0
whose value is the number of times that head and 1. We denote the current state, the next state,
appeared in these 1,000 tosses. The standard the next incoming bit, and the output bit of the
deviation of X (rounded to 2 decimal places) is Mealy machine by the variables s, t, b and y
________ . respectively.
36. Suppose that P is a 4 × 5 matrix such that every Assume the initial state of the Mealy machine is 0.
solution of the equation Px = 0 is a scalar multiple What are the Boolean expressions corresponding to
of [2 5 4 3 1]T. The rank of P is _______ . t and y in terms of s and b?
37. A bag has r red balls and b black balls. All balls are A. t = b B. t = s + b
identical except for their colours. In a trial, a ball is y =sb y = sb
randomly drawn from the bag, its colour is noted C. t = b Dt = s +b
and the ball is placed back into the bag along with y =sb y = sb
another ball of the same colour. Note that the
40. If the numerical value of a 2-byte unsigned integer
number of balls in the bag will increase by one, after
on a little endian computer is 255 more than that on
the trial. A sequence of four such trials is conducted.
a big endian computer, which of the following
Which one of the following choices gives the
choices represent(s) the unsigned integer on a little
probability of drawing a red ball in the fourth trial?
endian computer?
r +3 r A. 0×4243 B. 0×6665
A. B.
r +b+3 r +b
C. 0×0100 D. 0×0001
 r  r +1  r + 2  r + 3  41. Consider a pipelined processor with 5 stages,
C.     
r + b r + b + 1r + b + 2 r + b + 3 Instruction Fetch (IF), Instruction Decode (ID),
r Execute (EX), Memory Access (MEM), and Write
D.
r +b+3 Back (WB). Each stage of the pipeline, except the

9
byjusexamprep.com

EX stage, takes one cycle. Assume that the ID stage holding a global lock (L). The following scheme is
merely decodes the instruction and the register read used to own a resource instance :
is performed in the EX stage. The EX stage takes function OWNRESOURCE(Resource R)
one cycle for ADD instruction and two cycles for MUL Acquire lock L // a global lock
instruction. Ignore pipeline register latencies. if R is available then
Consider the following sequence of 8 instructions: Acquire R
ADD, MUL, ADD, MUL, ADD, MUL, ADD, MUL Release lock L
Assume that every MUL instruction is data- else
dependent on the ADD instruction just before it and if R is owned by another process P then
every ADD instruction (except the first ADD) is data- Terminate P, after releasing all resources
dependent on the MUL instruction just before it. The owned by P
Speedup is defined as follows: Acquire R
Execution time without operand forwarding Restart P
Speedup =
Execution time with operand forwarding
Release lock L
The Speedup achieved in executing the given end if
instruction sequence on the pipelined processor end if
(rounded to 2 decimal places) is ________. end if
42. Assume a two-level inclusive cache hierarchy, L1 end function
and L2, where L2 is the larger of the two. Consider Which of the following choice(s) about the above
the following statements. scheme is/are correct?
S1 : Read misses in a write through L1 cache do not A. The scheme violates the mutual exclusion
result in writebacks of dirty lines to the L2. property.
S2 : Write allocate policy must be used in B. The scheme ensures that deadlocks will not
conjunction with write through caches and no-write occur.
allocate policy is used with writeback caches. C. The scheme may lead to starvation.
Which of the following statements is correct? D. The scheme may lead to live-lock.
A. S1 is true and S2 is false 45. Consider the following ANSI C program:
B. S1 is false and S2 is false #include <stdio.h>
C. S1 is false and S2 is true #include <stdlib.h>
D. S1 is true and S2 is true struct Node{
43. Which of the following regular expressions int value;
represent(s) the set of all binary numbers that are struct Node *next;};
divisible by three? Assume that the string ϵ is int main(){
divisible by three. struct Node *boxE, *head, *boxN; int index = 0;
A. (0*(1(01*0)*1)*)* boxE = head = (struct Node *) malloc(sizeof(struct
B. (0 + 1(01*0)*1)* Node));
C. (0 + 11 + 11(1 + 00)*00)* head->value = index;
D. (0 + 11 + 10(1 + 00)*01)* for (index = 1; index <= 3; index++){
44. Consider a computer system with multiple shared boxN = (struct Node *) malloc(sizeof(struct Node));
resource types, with one instance per resource type. boxE->next = boxN;
Each instance can be owned by only one process at boxN->va1ue = index;
a time. Owning and freeing of resources are done by

10
byjusexamprep.com

boxE = boxN: } 48. For a statement S in a program, in the context of


for (index = 0; index <= 3; index++) { liveness analysis, the following sets are defined:
printf(“Value at index %d is %d\n”, index, head- USE (S) : the set of variables used in S
>value); IN (S) : the set of variables that are live at the entry
head = head->next; of S
printf(“Value at index %d is %d\n”, index+1, head- OUT(S) : the set of variables that are live at the exit
>value); } } of S
Consider a basic block that consists of two
Which one of the statements below is correct about statements, S1 followed by S2. Which one of the
the program? following statements is correct?
A. It dereferences an uninitialized pointer that may A. OUT(S1) = IN(S1) ∪ USE(S1)
result in a run-time error. B. OUT(S1) = IN(S2) ∪ OUT(S2)
B. It has a missing return which will be reported as C. OUT(S1) = IN(S2)
an error by the compiler. D. OUT(S1) = USE(S1) ∪ IN(S2)
C. Upon execution, the program creates a linked-list 49. A data file consisting of 1,50,000 student-records is
of five nodes. stored on a hard disk with block size of 4096 bytes.
D. Upon execution, the program goes into an infinite The data file is sorted on the primary key RollNo.
loop. The size of a record pointer for this disk is 7 bytes.
Each student-record has a candidate key attribute
46. The format of the single-precision floating-point called ANum of size 12 bytes. Suppose an index file
representation of a real number as per the IEEE 754 with records consisting of two fields, ANum value
standard is as follows: and the record pointer to the corresponding student
record, is built and stored on the same disk. Assume
sign exp onent mantissa
that the records of data file and index file are not
Which one of the following choices is correct with split across disk blocks. The number of blocks in the
respect to the smallest normalized positive number index file is ______ .
represented using the standard?
A. exponent = 00000000 and mantissa : 50. In an examination, a student can choose the order
00000000000000000000000 in which two questions (QuesA and QuesB) must be
B. exponent : 00000001 and mantissa : attempted.
00000000000000000000000 - If the first question is answered wrong, the student
C. exponent : 00000001 and mantissa : gets zero marks.
00000000000000000000001 - If the first question is answered correctly and the
D. exponent : 00000000 and mantissa : second question is not answered correctly, the
00000000000000000000001 student gets the marks only for the first question.
47. Let L ⊆ {0, 1)*be an arbitrary regular language - If both the questions are answered correctly, the
accepted by a minimal DFA with k states. Which one student gets the sum of the marks of the two
of the following languages must necessarily be questions.
accepted by a minimal DFA with k states? The following table shows the probability of correctly
A. L ∙ L B. {0, 1}* – L answering a question and the marks of the question
C. L – {01} D. L ∪ {01} respectively.

11
byjusexamprep.com

The above query gives, for each department in the


question probability of answering marks company, the number of female employees whose
correctly salary is greater than the average salary of
QuesA 0.8 10 A. employees in the company.
QuesB 0.5 20 B. female employees in the department.
Assuming that the student always wants to C. employees in the department.
maximize her expected marks in the examination, D. female employees in the company.
in which order should she attempt the questions and
what is the expected marks for that order (assume 54. Consider the string abbccddeee. Each letter in the
that the questions are independent)? string must be assigned a binary code satisfying the
A. First QuesB and then QuesA. Expected marks 14. following properties:
B. First QuesB and then QuesA. Expected marks 22. 1. For any two letters, the code assigned to one
C. First QuesA and then QuesB. Expected marks 16. letter must not be a prefix of the code assigned to
D. First QuesA and then QuesB. Expected marks 14. the other letter.
51. In the context of compilers, which of the following 2. For any two letters of the same frequency, the
is/are NOT an intermediate representation of the letter which occurs earlier in the dictionary order is
source program? assigned a code whose length is at most the length
A. Three address code of the code assigned to the other letter.
B. Control Flow Graph (CFG) Among the set of all binary code assignments which
C. Abstract Syntax Tree (AST) satisfy the above two properties, what is the
D. Symbol table minimum length of the encoded string?
A. 30 B. 25
52. Consider a set-associative cache of size 2KB (1KB = C. 21 D. 23
210 bytes) with cache block size of 64 bytes. Assume 55. Which one of the following circuits implements the
that the cache is byte-addressable and a 32-bit Boolean function given below?
address is used for accessing the cache. If the width f(x, y, z) = m0 + m1 + m3 + m4 + m5 + m6, where
of the tag field is 22 bits, the associativity of the mi is the ith min term.
cache is ________ .
53. The relation scheme given below is used to store
information about the employees of a company,
where empId is the key and deptId indicates the A.

department to which the employee is assigned. Each


employee is assigned to exactly one department.
emp (empId, name, gender, salary, deptId)
Consider the following SQL query:
select deptId, count(*)
from emp
B .
where gender = “female” and salary > (select
avg(salary) from emp)
group by deptId;

12
byjusexamprep.com

C. D.

****

13
COMPUTER ORGANIZATION & ARCHITECTURE DMA AND I/O INTERFACE

14

You might also like