Gate Mock Test- 1: CS/IT


Test Description

65 Questions MCQ Test GATE Computer Science Engineering(CSE) 2023 Mock Test Series | Gate Mock Test- 1: CS/IT

Gate Mock Test- 1: CS/IT for GATE 2022 is part of GATE Computer Science Engineering(CSE) 2023 Mock Test Series preparation. The Gate Mock Test- 1: CS/IT questions and answers have been prepared according to the GATE exam syllabus.The Gate Mock Test- 1: CS/IT MCQs are made for GATE 2022 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Gate Mock Test- 1: CS/IT below.
Solutions of Gate Mock Test- 1: CS/IT questions in English are available as part of our GATE Computer Science Engineering(CSE) 2023 Mock Test Series for GATE & Gate Mock Test- 1: CS/IT solutions in Hindi for GATE Computer Science Engineering(CSE) 2023 Mock Test Series course. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free. Attempt Gate Mock Test- 1: CS/IT | 65 questions in 180 minutes | Mock test for GATE preparation | Free important questions MCQ to study GATE Computer Science Engineering(CSE) 2023 Mock Test Series for GATE Exam | Download free PDF with solutions
1 Crore+ students have signed up on EduRev. Have you?
Gate Mock Test- 1: CS/IT - Question 1

X, Y and Z are the three contestants in one km race. If X can give Y a start of 52 metres and X can also give Z a start of 83 metres, how many metres start Y can give Z?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 1

While X runs 1000 metre, Y runs (1000-52) = 948 metre and Z runs (1000-83) = 917 metre
i.e., when Y runs 948 metre, Z runs 917 metre

⇒ When Y runs 1000 metre, Z runs 917/948 x 1000 = 967.30 metre

i.e., Y can give Z (1000-967.30) = 32.7 metre

Gate Mock Test- 1: CS/IT - Question 2

There are 5 brothers in a family. All were born at a gap of 3 years. If the sum total of ages of 5 brothers is 100. What is the age of 2nd most elder brother?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 2

Let the age of youngest brother be x Then, x + (x + 3) + (x + 6) + (x + 9) + (x + 12) = 100 => 5x = 70 => x = 14 Therefore, age of 2nd most elder brother = 14 + 9 = 23.

Gate Mock Test- 1: CS/IT - Question 3

If there are 5 persons who can work individually and complete a work in 2, 4, 5, 6 and 8 hours respectively. If they work together then how much time will it take to finish the work?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 3

In 1 hour, ½ + ¼ + ⅕ +⅙ + ⅛ = 149/120 = 1.24 is the work done. Hence, total time to complete the work would be = 1/1.24 = 0.80 hours

Gate Mock Test- 1: CS/IT - Question 4

If we increase the sides of a rectangular park by 20%, then, what is the total increase in the area of that park ?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 4

Let length of park = L and breadth of park = B Original Area = BL m2 New Length = 120L/100 = 6L/5 New Breadth = 120B/100 = 6B/5 New Area = 36LB/25 m2 so, Change in area = New – Original = 11LB/25 m2 % increase = Change / original * 100 = 44%

Gate Mock Test- 1: CS/IT - Question 5

The sum of the digits in the unit place of all the 4 digit numbers formed with the help of 3, 4, 5 and 6 taken all at a time is:

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 5

Required sum = 3!(3 + 4 + 5 + 6) = 108 [If we fix 3 of the unit place, other three digits can be arranged in ways similarly for 4, 5, 6.]

Gate Mock Test- 1: CS/IT - Question 6

Choose the one that best fits the sentence below-

The state’s duty is to _______ the safety of its citizen.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 6

The state’s duty is to ensure the safety of its citizen.

Gate Mock Test- 1: CS/IT - Question 7

Cocaine will have "pernicious" effect on your physical fitness.

Find synonym of the underlined word.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 7

Pernicious means harmful effect.

Gate Mock Test- 1: CS/IT - Question 8

Choose the one that best fits the sentence below.

The _______ of glory lead but to the ______.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 8

The path of glory lead but to the grave 

Gate Mock Test- 1: CS/IT - Question 9

Gardener said to me, “Don’t pluck the beautiful flowers.”

Select the appropriate Indirect Speech of the above.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 9

The appropriate speech is:

Gardner forbade me to pluck the flowers.

Gate Mock Test- 1: CS/IT - Question 10

I haven’t had a call from the office about the meeting ________ last Monday.
Select the appropriate word to fill in the blank from the given options.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 10

I haven’t had a call from the office about the meeting since last Monday.

Gate Mock Test- 1: CS/IT - Question 11

Let T(n) = 2T(n/4) + 100√n
The value of T(n) can be written as:

Gate Mock Test- 1: CS/IT - Question 12

Consider a sorted array of n elements. Let k inversions (swapping) have been performed on the sorted array and we want to sort it again to reverse effect of inversions. If K is very small in comparison to n, then which sorting technique will prove efficient for making again the list in sorted increasing order array.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 12

Insertion sort is directly proportional to number of inversions present in the list.

Gate Mock Test- 1: CS/IT - Question 13

What will the output of the following C code?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 13

Consider the while loop condition => i + 1 ? --i : j++ In first iteration : i + 1 = 3 (true) So ternary operator will return --i i.e. 1, condition part is 1 means true so while condition is true. Hence printf statement will print 1 In second iteration : i + 1 =2 (true) So ternary operator will return --i i.e 0, condition part is 0 means false so while condition is false. Hence program control will come out of the while loop.

Gate Mock Test- 1: CS/IT - Question 14

A balanced tree is given below. How many nodes will become unbalanced when a node is inserted as a child of node G?

Note: A node in a tree is balanced if absolute difference between its left and right subtrees is less than or equal to 1.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 14

 

In this structure, Node (C) (B) and (A) not having difference between left subtree and right subtree -1, 0, 1. Therefore 3 nodes become unbalanced.

Gate Mock Test- 1: CS/IT - Question 15

Consider the C code Below.

Q. Which of the following is the tightest upper bound on time complexity of above function.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 15

Important observation is Break statement terminates the innermost loop. So “*” is printed only n times.

Gate Mock Test- 1: CS/IT - Question 16

Consider the following statements about Bellman ford algorithm for finding shortest path in a directed connected graph G having integral edge weights.

Statement I: It will always find out negative edge weight cycle in G reachable from source.
Statement II: It will always give correct answer for the graph G.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 16

Statement 1 is true as in the nth iteration of Bellman Ford, if the length of the path of any node reachable from the source is decreased, that means we are having negative edge weight cycle in the graph. Statement 2 is false as no algorithm can give give correct answer if the Graph is having negative edge weight cycle.

Gate Mock Test- 1: CS/IT - Question 17

Consider the case: f(n) = O(g(n)). Then, following two statements are claimed to be inferred from the above case.

Statement I: 2f(n) = O(2g(n))
Statement II: 2g(n) = O(2f(n))

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 17

if f(n) = n and g(n) = 2n. then f(n) = O(g(n)) here, 2^n = O(2^(2n)) = O(4^n), but not vice versa. Hence, I is true. II is false. -------------- Now, if f(n) = 2n and g(n) = n then also f(n) = O(g(n)) because we can ignore constant but, 2^(2n) != O(2^n), hence I is false, but II is true. In both of the above cases, f(n) = O(g(n)). But both the cases are counter of each other. Hence both I and II are wrong.

Gate Mock Test- 1: CS/IT - Question 18

Let X and Y be the integers representing the number of simple graphs possible with 3 labeled vertices and 3 unlabeled vertices respectively. Let X - Y = N. Then, find the number of spanning trees possible with N labeled vertices complete graph.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 18

Number of simple graphs possible with n labeled vertices is 2^(n(n-1)/2). Number of simple graphs possible with n unlabeled vertices is n+1. Number of spanning tree possible with n vertices complete graph n^(n-2) X =8 Y = 4 X-Y=4 Therefore required answer is 4^2=16.

Gate Mock Test- 1: CS/IT - Question 19

Consider the following pseudo code.

Find the value of x, when the above code is executed in a function.

Gate Mock Test- 1: CS/IT - Question 20

Consider the following statements:

S1 : DFS of a directed graph always produces the same number of edges in the traversal, irrespective of the starting vertex.
S2 : If all of the back edges that are found while DFS traversal on directed graph are removed, the resulting graph is acyclic.
Q. Which of the following statements above are valid?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 20

Statement S1 : consider the graph

Starting with A (source vertex ) we will get 2 edges Starting with B will get only 1 edge Starting with C we will get no edge Therefore DFS on directed graph may not give same number of edges. Statement S2 : Back edges are those edges (u,v) connecting a vertex u to an ancestor u in a depth-first tree. Self-loops are considered to be back edges. Back edges describe descendant-to-ancestor relations, as they lead from “high” to “low” nodes. Suppose that there is a back edge (u, v). Then vertex v is an ancestor of vertex u in the depth-first forest. There is thus a path from v to u in G, and the back edge (u,v) completes a cycle. Removing the back edge will break the cycle. Therefore removing all the back edges will make the graph acyclic. So the statement is true.

Gate Mock Test- 1: CS/IT - Question 21

Which data structure would be the most appropriate to implement a collection of values with the following three characteristics?

i) Items are retrieved and removed from the collection in FIFO order.
ii) There is no priori limit to the number of items in the collection.
iii) The size of an item is large relative to storage required for a memory address.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 21

Head and tail pointers in singly link list will make the insertion and deletion in O(1) time complexity if we are accessing the elements in FIFO order. In doubly link list since only head pointer is given then for insertion we have to traverse the complete link list so insertion will be O(n) so not appropriate. In binary tree we have only a pointer to the root. Insertion and deletion in binary tree will be O(log n) so not appropriate. In hash table accessing the data in FIFO order will not be possible.

Gate Mock Test- 1: CS/IT - Question 22

Stack A has the entries as following sequence a, b, c (with ‘a’ on top), stack B is empty, as shown in the diagram below.

Q. An entry popped out of stack A can be printed or pushed to stack B. An entry popped out of stack B can only be printed. In this arrangement which of the following permutation of a, b, c are not possible to print?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 22

Follow these steps to print bac.
1) POP element ‘a’ from stack A, push ‘a’ to Stack B.
2) POP element ‘b’ from A, print it.
3) POP element ‘a’ from B, and print it.
4) POP element ‘c’ from A, and print it. Now, perumtation bac has been printed. Similarly, we can print bca and abc, but can’t print cab.

Gate Mock Test- 1: CS/IT - Question 23

Stack A has the entries as following sequence a, b, c (with ‘a’ on top), Stack B is empty, as shown in the diagram below.

Q. Considering the data given in the previous question, if the stack A had 4 entries, then the number of possible permutations that can be printed will be:

Gate Mock Test- 1: CS/IT - Question 24

Given a hash table with n keys and m slots with simple uniform hashing. If collisions are resolved by chaining then what is the probability that the first slot ends up empty?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 24

Probability of one particular slot = 1/m ( because total m slots) Probability that a value should not go in one particular slot = 1 – (1/m) For n values (keys) probability = [1 – (1/m)]n

Gate Mock Test- 1: CS/IT - Question 25

Consider the following instance of knapsack problem:

Q. The maximum weight of 12 is allowed in the knapsack. Find the value of maximum profit with the optimal solution of the fractional knapsack problem.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 25

Gate Mock Test- 1: CS/IT - Question 26

Find the maximum value of the expression (x+y+k) where (x,y) satisfies the equation (x-2)2 + (y-3)2= 25

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 26

Since (X,Y) is a point on circle, the general form of the point is X = 2 + 5*cost, y = 3 + 5*sint We need to maximise the value of x+y+k x+y+k = 2 + 5*cost + 3 + 5*sint + k = (5+k) + 5*(cost+sint) Here, k is a constant. The maximum value of c + acost + bsint is equals to c + sqrt (a*a +b*b). Maximum value of (5+k) + 5*(cost+sint) (5+k) + 5*sqrt(2) The result is (5+k) + 5*sqrt(2).

Gate Mock Test- 1: CS/IT - Question 27

Which of the following argument is invalid?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 27

“⟺” mean equal. ifA⟺B means A is equal to B.
Option (a); (p→(q⋁r) )⟺(~p⋁(q⋁r) ) ⟺((~p⋁q)⋁r) ⟺(~(p⋀~q)⋁r) [∵De morgan’s law] ⟺(p⋀~q)→r ∴(p→(q⋁r) )⟺((p⋀~q)→r)

Option (b); (p→r)⋀(q→r)⟺(~p⋁r)⋀(~q⋁r) ⟺(~p⋀~q)⋁r [∵ De morgan’s law] ⟺~(p⋁q)⋁r ⟺(p⋁q)→r ∴(p→r)⋀(q→r)⟺(p⋁q)→r

Option (c): p→(q→r)⟺~p⋁(q→r) ⟺ ~p⋁(~q⋁r) ⟺~q⋁(~p⋁r) ⟺~q⋁(p→r) ⟺q→(p→r)

Option (d): (p↔q)⟺(p→q)⋀(q→p) ⟺(~p⋁q)⋀(~q⋁p) ⟺(~p⋁q)⋀(p⋁~q) ⟺(~p⋀~q)⋁(p⋀q) ⟺ ~(p⋁q)⋁(p⋀q) (p↔q)⟺(p⋁q)⋁(p⋀q) is wrong.

Gate Mock Test- 1: CS/IT - Question 28

The value of the following Integral is:

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 28

Gate Mock Test- 1: CS/IT - Question 29

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 29

Gate Mock Test- 1: CS/IT - Question 30

Which Of the following statements are true?
S1: Every Distributive lattice has unique complement.
S2: In Complemented lattice every element has at least one complement.
S3: Boolean lattice is both complemented and distributive.
S4: In Boolean lattice every lattice has exactly one complement.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 30

Clearly S1 is wrong because in distributive lattice a element may have zero complement. Rest other statements are properties of the corresponding lattices.

Gate Mock Test- 1: CS/IT - Question 31

Given a graph G (V, E) is Bipartite, what is the chromatic number of G?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 31

Since the graph G is bipartite, the vertices set V can be partitioned into two disjoint sets. This shows that we can color the graph with 2 colors such that no two adjacent vertices will have same color.

Gate Mock Test- 1: CS/IT - Question 32

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 32


Gate Mock Test- 1: CS/IT - Question 33

Let f(n) = Σ [(log(n/2i) +100] where i limits from 0 to k, and n = 2k.
Find the time complexity of f(n).

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 33


 

Gate Mock Test- 1: CS/IT - Question 34

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 34

Gate Mock Test- 1: CS/IT - Question 35

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 35


Gate Mock Test- 1: CS/IT - Question 36

If P, Q are the roots of the quadratic equation x2 + ax + b. Find the value of P3 +Q3.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 36

Gate Mock Test- 1: CS/IT - Question 37

Given F is an expression of P,Q. Derive the expression F(P,Q) from the truth table given below.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 37

Gate Mock Test- 1: CS/IT - Question 38

In a random experiment, suppose 3 unbiased coins are tossed simultaneously, what is the probability of getting at least 2 Heads?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 38

Gate Mock Test- 1: CS/IT - Question 39

Consider a DFA accepting all strings over {a, b} where the number of a’s mod 3 = 2 and number of b’s are odd. What is the minimum number of states of such DFA?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 39

The above question is an example of product automata. If we have two cases for which we can have separate DFA’s we can merge the two by product automata. The resulting DFA has number of states equal to the product of the states of the separate DFA’s. Here DFA for accepting all strings over {a, b} where the number of a’s mod 3 = 2 would have 3 states. ( number of a’s mod 3 would give remainder either 0, 1, 2 so 3 states to depict each). Similarly DFA accepting all strings over {a, b} where the number of b’s are odd ( number of b’s mod 2 = 0) would have 2 states. Hence resulting DFA for both the conditions would have 2*3 = 6 states.

Gate Mock Test- 1: CS/IT - Question 40

Which of the following languages are regular over ∑ = {a, b}?
L1 = { anbn | 0 < n ≤ 10}
L2 = { a2n | n ≥ 1}
L3 = { an! | n > 0}

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 40

Any language for which we have a finite set or we can possibly have a DFA drawn for it is regular. L1: It gives a finite set generating string with equal number of a’s and equal number of b’s for range 0

Hence L2 is also regular. L3: It gives all possible strings with a’s such that number of a’s are in factorial values of 1,2,3,4 ……. i.e. {a1, a2, a6, a24 ……………}. The set is neither finite nor a DFA is possible for such set. Hence L3 is not regular.

Gate Mock Test- 1: CS/IT - Question 41

The language L = {WbcWR | W ∈ (a+b)*} is _____.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 41

Any language for which we can have a Deterministic PDA is always a DCFL. Here for language L= {WbcWR | W ∈ (a+b)*} we can have a PDA with following transitions in which PDA accepts a string when it halts on a final state. q0 in initial state and qf is final state. 1. (q0, a , Z) -> (q0, aZ) 2. (q0, b , Z) -> (q0, bZ) 3. (q0, a , a) ->(q0, aa) 4. (q0, b , a) -> (q0, ba) 5. (q0, a, b) -> (q0, ab) 6. (q0, b , b) -> (q0, bb) 7. (q0, c , b) -> (q1, null) 8. (q1, a , a) ->(q1, null) 9. (q1, b , b) -> (q1, null) 10. (q1, null, Z ) -> (qf, Z) Here all a’s and b’s are initially pushed onto the stack for W. As soon as a c occurs after b , B is popped from the stack after which W^R is checked. If the further string alphabets match the alphabet of the stack the alphabet is popped from the stack and finally the string reaches the final state if language is of the form L= {WbcW^R | W ∈ (a+b)*}. Hence the above language is a DCFL.

Gate Mock Test- 1: CS/IT - Question 42

Which of the following languages are closed under complementation?
A) Context free
B) Recursive
C) Recursive Enumerable

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 42

According to closure properties of languages, context free and recursive enumerable languages are not closed under complementation while recursive language is.

Gate Mock Test- 1: CS/IT - Question 43

Which of the following statements is incorrect?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 43

Statement 1 is correct because union of two DCFL may or may not be DCFL but surely CFL. Statement 2 is correct because regular languages are closed under complementation. Statement 3 is correct because Turing recognizable languages or recursive enumerable languages are closed under intersection.

Gate Mock Test- 1: CS/IT - Question 44

Which of the following is not a CFL?
A)L = {albmcn where l=m or l=n}
B)L = {albmcn where l=m and l=n}
C)L = {albmcn where l = m + n}

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 44

Language in A is CFL because CFL can make one comparison which is either l and m must be equal or l and n must be equal. Similarly language in C is also CFL. But B is not because it has to make two comparisons. So language in B is CSL not CFL.

Gate Mock Test- 1: CS/IT - Question 45

Identify the circuit shown below:

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 45

In the circuit shown there are two tristate buffers. One with active low enable and second one with active high enable. As per the operation of these buffers truth table is given below. It is equivalent to 2 x 1 MUX B is selection line, A & C are the input lines, ‘D’ is the output.

Gate Mock Test- 1: CS/IT - Question 46

The 32 bit floating point representation of (-12) is ___

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 46

To convert the floating point into decimal, we have 3 elements in a 32-bit floating point representation:

  • Sign (MSB)
  • Exponent (8 bits after MSB)
  • Mantissa (Remaining 23 bits)

Sign bit is the first bit of the binary representation. '1' implies negative number and '0' implies positive number. Sign bit=1 Exponent is decided by the next 8 bits of binary representation. Hence the exponent of 2 will be 3. i.e 23=8. 127 is the unique number for 32 bit floating point representation. It is known as bias. It is determined by 2k-1-1 where 'k' is the number of bits in exponent field. Thus bias = 127 for 32 bit. (28-1-1 = 128-1=127) 127+3=130 i.e. 10000010 in binary representation. Mantissa: 12 in binary = 1100 Move the binary point so that there is only one bit from the left. Adjust the exponent of 2 so that the value does not change. This is normalizing the number. 1.100 x 23 10000000000000000000000 Thus the floating point representation of -12 is 1 10000010 10000000000000000000000

Gate Mock Test- 1: CS/IT - Question 47

The following is the AB flip flop:

What are values of A, B when change in the flip flop state is from 0 to 1?

Note: x in the options below represents that it can have any value out of 0 and 1.

Gate Mock Test- 1: CS/IT - Question 48

An instruction pipeline has 4 stages Instruction Fetch(IF), Instruction Decode(ID), Execute instruction (Ex), Write Back(WB). All instructions take all stages and takes 4 clock cycles. Branch instructions are not overlapped, i.e. the instructions after the branch are not fetched till branch is known. Branch is known in the execute phase. Suppose 20% instructions are conditional and 80 % unconditional. Calculate speed up for 100 instructions (upto 2 decimal place). Ignore the case that the branch may not be taken.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 48

Suppose each stage takes 1 s. 20 conditional – 20*3 s (Cycles per instruction for conditional instructions is 3 as branch is known at the third stage) 80 unconditional – 80 s (Cycles per instruction for unconditional is 1) So total time taken with pipeline = 20*3 + 80 = 140 s Time taken without pipeline = 4 * 100 (Cycle per instruction for all is 4) Speed up = 400 / 140 = 2.86

Gate Mock Test- 1: CS/IT - Question 49

A digital computer has a memory unit of 256k x 16 and a cache memory of 4k words. The cache uses direct mapping with a block size of 16 words.

Q. How many bits are there in index, tag, block and words fields of address format?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 49

Main Memory has 256k = 28 x 210 = 218.
i.e. We need 18 bits to address main memory.
Cache Memory has 4k = 22 x 210 = 212.
i.e. We need 12 bits to address cache memory.

Cache consists of Index and tag which together are used to address main memory location.
Here Index is 12 bits and tag is 6 bits. (18 – 12 = 6).

Index is divided into block part and word part. Block part is used to address blocks in cache and word part addresses individual word in a block.

Here a block size is 16 words. i.e. 24, we need 4 bits to address a word and 12 – 4 = 8 bits to address a block in cache memory.

Gate Mock Test- 1: CS/IT - Question 50

A digital computer has a memory unit of 256k x 16 and a cache memory of 4k words. The cache uses direct mapping with a block size of 16 words.

Q. How many blocks can cache accommodate?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 50

Since cache is 4k words and block size is 16 words i.e. No of blocks in cache = 4k/16 = 256.

Gate Mock Test- 1: CS/IT - Question 51

On a system using round-robin scheduling let 's' represent the time needed to perform a process switch, 'q' represents the round-robin time quantum, and 'r' represents the average time a process runs before blocking on I/O. The CPU efficiency when s = q < r is:

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 51

‘r’ is the average time a process runs before I/O block and ‘s’ is the time needed for switch. 'q' represents the round-robin time quantum. The efficiency of the CPU when s < r and q < r. = r/(r/q)*s+r = q/(q+s) Here s = q. Hence efficiency is ½.

Gate Mock Test- 1: CS/IT - Question 52

A counting semaphore was initialized to 0, then 20 V operations were successfully completed on this semaphore, followed with 18 P operations, the resulting value of the semaphore is:

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 52

20V => increments the semaphore 20 times. Hence , the value becomes 20. 18P => decrements the semaphore 18 times. Hence , the value becomes 2.

Gate Mock Test- 1: CS/IT - Question 53

Consider all the processes are arriving at large time intervals. Let t be the time interval between two processes Pi and Pi+1 for any i and service time of Pi is Si. If t > Si for every i then, what should be the strategy to schedule the processes?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 53

 

If t>Si then all the processes are serviced in FCFS based because when the next process arrives the previous process is already completed.

Gate Mock Test- 1: CS/IT - Question 54

The following graph shows the schedule of five transactions. The schedule is:

Gate Mock Test- 1: CS/IT - Question 55

A student relation with 4 attributes is defines as R(ABCD). Which of the following query will execute without error if all attributes are numeric.
A) ∏B,CA>20)
B) σA>20(∏B,C)

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 55

Query in A is correct It will first select required rows and then project required columns. But query in B is not correct as after projecting B and C columns. It can't have row selection based on condition on attribute A So, correct option is 1.

Gate Mock Test- 1: CS/IT - Question 56

Using the EMPLOYEE table, the following query is issued to generate the name, salary and the salary increased after an appraisal by 25 %. The increased salary for all the employee should be above 25000.

Q. The above query throws an error. What is the reason for the error?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 56

A column alias cannot be used in WHERE clause conditions but can be used in SELECT statement and ORDER BY clause.

Gate Mock Test- 1: CS/IT - Question 57

Consider the following CFG

Q. The above grammar is:

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 57

The grammar is unambiguous (only one parse tree) , not left recursive ( Non-terminal not present in second and third grammar rule) . It is left factored . It is LL(1).

Gate Mock Test- 1: CS/IT - Question 58

Consider the following SDT

Q. What will be output by the SDT for the input string “14122323”?

Gate Mock Test- 1: CS/IT - Question 59

A directed acyclic graph represents one form of intermediate representation. The number of non terminal nodes in DAG of a = (b+c)*(b+c) expression is:

Gate Mock Test- 1: CS/IT - Question 60

Consider the following grammar

Q. The above grammar is:

Gate Mock Test- 1: CS/IT - Question 61

Let 5 stations are connected to CSMA/CD network . Every station wants to transmit data with probability p = 0.6. It is given that there will be no collision if only one station will transmit. What is the probability of successful transmission?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 61

Success will be for one station and failure for other four Thus Psucc =5 c1 *(0.6)*(o.4)4 =0.0768.

Gate Mock Test- 1: CS/IT - Question 62

Consider the following two statements:

Statement 1: Stop and Wait protocol is preferred for LANs compared to WANs.

Statement 2: Stop and Wait protocol is good for bursty data transmission.

Q. Which of the above two statements are true?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 62

Efficiency of Stop and Wait is given by, E= 1/(1 +(2*d*B)/v*L), link speed(v) and Bandwith (B) are fixed . Thus only variable terms are packet length(L) and distance(d) Cleary, E decreases with increase in d . And E will increase with increase in L . Hence Stop and Wait is suitable for LANs and bursty data.

Gate Mock Test- 1: CS/IT - Question 63

A broadcast channel has 10 nodes and total capacity of 10 Mbps. It uses polling for medium access. Once a node finishes transmission, there is a polling delay of 80 μs to poll the next node. Whenever a node is polled, it is allowed to transmit a maximum of 1000 bytes. The maximum throughput of the broadcast channel is

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 63

Gate Mock Test- 1: CS/IT - Question 64

Match the protocol with the characteristics:
1. Mails are stored on the computer client use.
2. Stateless protocol.
3. Converts MAC address to IP address.
4. Used to send error messages.

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 64

In POP3 protocol mails are stored on client’s computer while in IMAP mails are stored on the server. HTTP is a stateless protocol, RARP is used to convert MAC to IP while ARP is used to convert IP to MAC, ICMP is used for sending error messages.

Gate Mock Test- 1: CS/IT - Question 65

In public key and private key cryptography, host ‘A’ has PuA and PrA, host ‘B’ has PuB and PrB as public and private keys respectively. Now, if ‘A’ wants to send a message to ‘B’ securely, which key will be used by ‘A’ for encryption?

Detailed Solution for Gate Mock Test- 1: CS/IT - Question 65

If the message is encrypted using PuB, then it can be decrypted using only PrB, which will be known only to ‘B’.

Use Code STAYHOME200 and get INR 200 additional OFF
Use Coupon Code
Information about Gate Mock Test- 1: CS/IT Page
In this test you can find the Exam questions for Gate Mock Test- 1: CS/IT solved & explained in the simplest way possible. Besides giving Questions and answers for Gate Mock Test- 1: CS/IT, EduRev gives you an ample number of Online tests for practice