GATE Exam  >  GATE Tests  >  Computer Science And IT (CS/IT) Mock Test - 8 For Gate - GATE MCQ

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - GATE MCQ


Test Description

30 Questions MCQ Test - Computer Science And IT (CS/IT) Mock Test - 8 For Gate

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

Suppose there are two teams A and B. Both of them are competing with each other on a racing track of 1 km. But team A has got the advantage of starting the race from 280 m from the starting point. If the ratio of speed of A to B is 3:4. 

Select the correct option from the options given below:

Detailed Solution for Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 1

To win the race first,
A has to cover (1000 – 280) m = 720m
B covers 4 part of distance when A covers 3 part of it.
So, if A covers 720m, then B covers (4/3 * 720)m i.e. 960m
Hence, A will win the race by 40m.

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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 Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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 Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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 Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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%

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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 Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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.]

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 6

Choose the one that best fits the sentence below. 

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

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 7

Cocaine will have pernicious effect on your physical fitness. 

Find synonym of the underlined word.

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 8

Choose the one that best fits the sentence below.

The _______ of glory lead but to the ______

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 9

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

Select the appropriate Indirect Speech of the above.

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 11

Let T(n) = 2T(n/4) + 100√n 

The value of T(n) can be written as:

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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 Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 12

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

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 13

What will the output of the following C code ?

#include <stdio.h>
int main()
{
int i=2, j=2;
while (i+1 ? --i : j++)
printf("%d",i);
return 0;
}

Detailed Solution for Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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.

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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.

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 15

Consider the C code Below.

void function(int n)
{
    if (n == 1) 
      return;
    for (int i = 0; i<n; i++)
    {
        for (int j = 1; j< = n; j++)
        {
            printf("*");            
            break;
        }
    }
}

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

Detailed Solution for Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 15

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

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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. Choose from the options given below.

Detailed Solution for Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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.

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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)) 

Choose the correct option from the given.

Detailed Solution for Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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.

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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 Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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 42=16.

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 19

Consider the following pseudo code.

x = 0;
for (i = 1 to n)
  for (j = 1 to 4i – 3)
    x = x + 1

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

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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. 

Which of the following statements above are valid ?

Detailed Solution for Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 20

Statement S1 : consider the graph

 

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.

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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 Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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.

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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.

 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?

(i)   bac
(ii)  bca
(iii) cab
(iv) abc

Detailed Solution for Computer Science And IT (CS/IT) Mock Test - 8 For Gate - 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.

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 23

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:

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 24

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

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 25

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 Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 25

​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

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 26

Consider the following instance of knapsack problem:

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 Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 26

Decreasing order of P i /W i is X1, X4, X3, X5, X2 X1 → profit = 15 and weight = 2 Including X4 → profit = 15 + 16 and weight = 2 + 4 = 6 Including X3 → profit = 40 and weight = 9 Now weight left = 3 Weight of X5 = 6 → half of X5 can be included. Profit = 40 + 17/2 = 48.5.

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 27

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 Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 27

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).

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 28

Which of the following argument is invalid ?

Detailed Solution for Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 28

“⟺” 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.

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 29

The value of the following Integral is:

Detailed Solution for Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 29

Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 30

consider a Matrix   . The number of linearly independhent Eigen Vector for the Eigen value 1 is ______________.

Detailed Solution for Computer Science And IT (CS/IT) Mock Test - 8 For Gate - Question 30

View more questions
Information about Computer Science And IT (CS/IT) Mock Test - 8 For Gate Page
In this test you can find the Exam questions for Computer Science And IT (CS/IT) Mock Test - 8 For Gate solved & explained in the simplest way possible. Besides giving Questions and answers for Computer Science And IT (CS/IT) Mock Test - 8 For Gate, EduRev gives you an ample number of Online tests for practice
Download as PDF