Computer Science And IT (CS/IT) Mock Test 3 For Gate


65 Questions MCQ Test Mock Test Series - Computer Science Engg. (CSE) GATE 2020 | Computer Science And IT (CS/IT) Mock Test 3 For Gate


Description
This mock test of Computer Science And IT (CS/IT) Mock Test 3 For Gate for GATE helps you for every GATE entrance exam. This contains 65 Multiple Choice Questions for GATE Computer Science And IT (CS/IT) Mock Test 3 For Gate (mcq) to study with solutions a complete question bank. The solved questions answers in this Computer Science And IT (CS/IT) Mock Test 3 For Gate quiz give you a good mix of easy questions and tough questions. GATE students definitely take this Computer Science And IT (CS/IT) Mock Test 3 For Gate exercise for a better result in the exam. You can find other Computer Science And IT (CS/IT) Mock Test 3 For Gate extra questions, long questions & short questions for GATE on EduRev as well by searching above.
QUESTION: 1

​The simplified SOP (Sum of Product) form of the Boolean expression

Solution:

QUESTION: 2

Which one of the following circuits is NOT equivalent to a 2-input XNOR (exclusive NOR) gate?

Solution:

All options except option ‘D’ gives EX-NOR gates

QUESTION: 3

The minimum number of D flip-flops needed to design a mod-258 counter is

Solution:

2n ≥ 258 ⇒ n = 9

QUESTION: 4

A thread is usually defined as a ‘light weight process’ because an operating system (OS) maintains smaller data structures for a thread than for a process. In relation to this, which of the followings is TRUE?

Solution:
QUESTION: 5

K4 and Q3 are graphs with the following structures

 

Q. Which one of the following statements is TRUE in relation to these graphs?

Solution:

QUESTION: 6

If the difference between the expectation of the square of random variable and the square of the expectation of the random variable is denoted by R then

Solution:
QUESTION: 7

The lexical analysis for a modern computer language such as Java needs the power of which one of the following machine models in a necessary and sufficient sense?

Solution:

Lexical Analysis is implemented by finite automata

QUESTION: 8

Let the page fault service time be 10ms in a computer with average memory access time being 20ns. If one page fault is generated for every 106 memory accesses, what is the effective access time for the memory?

Solution:

QUESTION: 9

Consider a hypothetical processor with an instruction of type LW R1, 20(R2), which during execution reads a 32-bit word from memory and stores it in a 32-bit register R1. The effective address of the memory location is obtained by the addition of constant 20 and the contents of register R2. Which of the following best reflects the addressing mode implemented by this instruction for the operand in memory?

Solution:

Here 20 will act as base and content of R2 will be index

QUESTION: 10

What does the following fragment of C-program print?

Solution:
QUESTION: 11

A max-heap is a heap where the value of each parent is greater than or equal to the value of its children. Which of the following is a max-heap?

Solution:

Heap is a complete binary tree

QUESTION: 12

An algorithm to find the length of the longest monotonically increasing sequence of numbers in an array is given below.
Let Li denote the length of the longest monotonically increasing sequence starting at index i in the array

Initialize Ln-1 =1

For all i such that 0 ≤ i ≤ n − 2

Finally the length of the longest monotonically increasing sequence is Max 

 

Q. Which of the following statements is TRUE?

Solution:
QUESTION: 13

Let P be a regular language and Q be a context free language such that Q ⊆ P. (For example, let P be the language represented by the regular expression p*q* and Q be {pnqn | n ∈ N}).

 

Q. Then which of the following is ALWAYS regular?

Solution:

Σ* − P is the complement of P so it is always regular,

since regular languages are closed under complementation

QUESTION: 14

In a compiler, keywords of a language are recognized during

Solution:

Any identifier is also a token so it is recognized in lexical Analysis

QUESTION: 15

A layer-4 firewall (a device that can look at all protocol headers up to the transport layer) CANNOT

Solution:

Since it is a layer 4 firewall it cannot block application layer protocol like HTTP.

QUESTION: 16

If two fair coins are flipped and at least one of the outcomes is known to be a head, what is the probability that both outcomes are heads?

Solution:

Sample space = {HH, HT, TH}

Required probability = 1/3

QUESTION: 17

Consider different activities related to email.

m1: Send an email from a mail client to a mail server

m2: Download an email from mailbox server to a mail client

m3: Checking email in a web browser

 

Q. Which is the application level protocol used in each activity?

Solution:

Sending an email will be done through user agent and message transfer agent by SMTP, downloading an email from mail box is done through POP, checking email in a web browser is done through HTTP

QUESTION: 18

A company needs to develop a strategy for software product development for which it has a choice of two programming languages L1 and L2. The number of lines of code (LOC) developed using L2 is estimated to be twice the LOC developed with L1. the product will have to be maintained for five years. Various parameters for the company are given in the table below.

 

Q. Total cost of the project includes cost of development and maintenance. What is the LOC for L1 for which the cost of the project using L1 is equal to the cost of the project using L2? 

Solution:

QUESTION: 19

Let the time taken to switch between user and kernel modes of execution be t1 while the time taken to switch between two processes be t2. Which of the following is TRUE?

Solution:

Process switching also involves mode changing.

QUESTION: 20

A company needs to develop digital signal processing software for one of its newest inventions. The software is expected to have 40000 lines of code. The company needs to determine the effort in person-months needed to develop this software using the basic COCOMO model. The multiplicative factor for this model is given as 2.8 for the software development on embedded systems, while the exponentiation factor is given as 1.20. What is the estimated effort in personmonths?

Solution:

QUESTION: 21

Which of the following pairs have DIFFERENT expressive power?

Solution:

NPDA is more powerful than DPDA.
Hence answer is (B)

QUESTION: 22

HTML (Hyper Text Markup Language) has language elements which permit certain actions other than describing the structure of the web document. Which one of the following actions is NOT supported by pure HTML (without any server or client side scripting) pages?

Solution:
QUESTION: 23

Which of the following is NOT desired in a good Software Requirement Specifications (SRS) document?

Solution:
QUESTION: 24

A computer handles several interrupt sources of which the following are relevant for this question.
Interrupt from CPU temperature sensor

Interrupt from Mouse

Interrupt from Keyboard

Interrupt from Hard Disk

Solution:
QUESTION: 25

Consider a relational table with a single record for each registered student with the following attributes.

1. Registration_Number: Unique registration number for each registered student

2. UID: Unique Identity number, unique at the national level for each citizen

3. BankAccount_Number: Unique account number at the bank. A student can have multiple accounts or joint accounts. This attributes stores the primary account number

4. Name: Name of the Student

5. Hostel_Room: Room number of the hostel

 

Q. Which of the following options is INCORRECT?

Solution:

In case two students hold joint account then BankAccount_Num will not uniquely determine other attributes.

QUESTION: 26

Which of the given options provides the increasing order of asymptotic complexityoffunctions f1,f2,f3 and f4?

Solution:

QUESTION: 27

Four matrices M1, M2, M3 and M4 are dimensions p × q, q × r, r × s and s × t respectively can be multiplied in several ways with different number of total scalar multiplications. For example When multiplied as  the total number of scalar multiplications is pqr+rst+prt. When multiplied as  the total number of scalar multiplications is pqr+prs+pst.

 

Q. If p=10, q=100, r=20, s=5 and t=80, then the minimum number of scalar multiplications needed is 

Solution:

QUESTION: 28

Consider a relational table r with sufficient number of records, having attributes A1, A2,…, An and let 1 ≤ p ≤ n. Two queries Q1 and Q2 are given below.

 

Q. The database can be configured to do ordered indexing on Ap or hashing on Ap.
Which of the following statements is TRUE? 

Solution:
QUESTION: 29

Consider the matrix as given below.

 

Q. Which one of the following provides the CORRECT values of eigenvalues of the matrix? 

Solution:

Given matrix is upper triangular matrix and its diagonal elements are its eigen values = 1, 4, 3

QUESTION: 30

Consider an instruction pipeline with four stages (S1, S2, S3 and S4) each with combinational circuit only. The pipeline registers are required between each stage and at the end of the last stage. Delays for the stages and for the pipeline registers are as given in the figure.

 

 

Q. What is the approximate speed up of the pipeline in steady state under ideal conditions when compared to the corresponding non-pipeline implementation? 

Solution:

QUESTION: 31

Definition of a language L with alphabet {a} is given as following

 

Q. What is the minimum number of states needed in a DFA to recognize L? 

Solution:

QUESTION: 32

An 8KB direct mapped write-back cache is organized as multiple blocks, each of size 32-bytes. The processor generates 32-bit addresses. The cache controller maintains the tag information for each cache block comprising of the following.

1 Valid bit

1 Modified bit

As many bits as the minimum needed to identify the memory block mapped in the cache.

 

Q. What is the total size of memory needed at the cache controller to store metadata (tags) for the cache?

Solution:

QUESTION: 33

An application loads 100 libraries at startup. Loading each library requires exactly one disk access. The seek time of the disk to a random location is given as 10ms.Rotational speed of disk is 6000rpm. If all 100 libraries are loaded from random locations on the disk, how long does it take to load all libraries? (The time to transfer data from the disk block once the head has been positioned at the start of the block may be neglected)

Solution:

QUESTION: 34

A deterministic finite automation DF(A D) with alphabet ∑ ={ a, b} is given below

 

Q. Which of the following finite state machines is a valid minimal DFA which accepts the same language as D?

Solution:

Options B and C will accept the string b

Option – D will accept the string “bba” Both are invalid strings.
So the minimized DFA is option A

QUESTION: 35

The following is comment written for a C function /* This function computes the roots of a quadratic equation  a.x^2+b.x+c=0. The function stores two real roots in *root1 and *root2 and returns the status of validity of roots. It handles four different kinds of cases.

(i) When coefficient a is zero irrespective of discriminant

(ii) When discriminant is positive

(iii) When discrimanant is zero

(iv) When discrimanant is negative

Only in cases ii and iii , the stored roots are valid.
Otherwise 0 is stored in the roots. the function returns 0 when the roots are valid and -1 otherwise.
The functin also ensures root1>=root2. int get_QuadRoots ( float a, float b, float c, float *root1, float *root2) ; * /

A software test engineer is assigned the job of doing black box testing. He comes up with the following test cases, many of which are redundant.

 

Q. Which one of the following options provide the set of non-redundant tests using equivalence class partitioning approach from input perspective for black box testing?

Solution:

QUESTION: 36

Database table by name Loan_Records is given below.

What is the output of the following SQL query?
SELECT count(*)

FROM(
(SELECT Borrower. Bank_Manager FROM Loan_Records) AS S NATURAL JOIN
(SELECT Bank_Manager, Loan_Amount FROM Loan_Records) AS T

);

Solution:

 

QUESTION: 37

Consider two binary operators ' ↑ ' and ' ↓ ' with the precedence of operator ↓ being lower than that of the operator ↑ . Operator ↑ is right associative while operator ↓, is left associative. Which one of the following represents the parse tree for expression (7 ↓ 3 ↑ 4 ↑ 3 ↓ 2) ?

Solution:

QUESTION: 38

 

Q. Which of the following statements is NOT TRUE?

Solution:

L1: regular language

L2: context free language

L3: context sensitive language

QUESTION: 39

On a non-pipelined sequential processor, a program segment, which is a part of the interrupt service routine, is given to transfer 500 bytes from an I/O device to memory.
Initialize the address register

Initialize the count to 500

LOOP: Load a byte from device

Store in memory at address given by address register

Increment the address register

Decrement the count

If count != 0 go to LOOP

Assume that each statement in this program is equivalent to a machine instruction which takes one clock cycle to execute if it is a non-load/store instruction. The load-store instructions take two clock cycles to execute.
The designer of the system also has an alternate approach of using the DMA controller to implement the same transfer. The DMA controller requires 20 clock cycles for initialization and other overheads. Each DMA transfer cycle takes two clock cycles to transfer one byte of data from the device to the memory.

 

Q. What is the approximate speedup when the DMA controller based design is used in place of the interrupt driven program based input-output?

Solution:

No. of clock cycles required by using load-store approach = 2 + 500 × 7 = 3502 and that of by using DMA = 20 + 500 × 2 = 1020

QUESTION: 40

We are given a set of n distinct elements and an unlabeled binary tree with n nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree?

Solution:
QUESTION: 41

Which one of the following options is CORRECT given three positive integers x, y and z, and a predicate

P(x) = ¬(x =1)∧∀y(∃z(x = y*z) ⇒ (y = x)∨(y =1))

Solution:
QUESTION: 42

Solution:

QUESTION: 43

Consider a database table T containing two columns X and Y each of type integer. After the creation of the table, one record (X= 1, Y=l) is inserted in the table.

Let MX and MY denote the respective maximum values of X and Y among all records in the table at any point in time. Using MX and MY, new records are inserted in the table 128 times with X and Y values being MX+1, 2*MY+1 respectively. It may be noted that each time after the insertion, values of MX and MY change.

 

Q. What will be the output of the following SQL query after the steps mentioned above are carried out?
SELECT Y FROM T WHERE X=7;

Solution:

QUESTION: 44

Consider a finite sequence of random values be the mean and σx be the standard deviation of X .Let another finite sequence Y of equal length be derived from this as yi = a * xi + b, where a and b are positive constants. Let µy be the mean and σy be the standard deviation of this sequence.

 

Q. Which one of the following statements is INCORRECT?

Solution:
QUESTION: 45

A deck of 5 cards (each carrying a distinct number from 1 to 5) is shuffled thoroughly. Two cards are then removed one at a time from the deck. What is the probability that the two cards are selected with the number on the first card being one higher than the number on the second card?

Solution:

QUESTION: 46

Consider the following table of arrival time and burst time for three processes P0, P1 and P2.

 

Q. The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for the three processes? 

Solution:

QUESTION: 47

Consider evaluating the following expression tree on a machine with load-store architecture in which memory can be accessed only through load and store instructions. The variables a, b, c, d and e are initially stored in memory. The binary operators used in this expression tree can be evaluated by the machine only when the operands are in registers. The instructions produce result only in a register. If no intermediate results can be stored in memory, what is the minimum number of registers needed to evaluate this expression?

Solution:

QUESTION: 48

(Direction) Common Data Questions: 48 & 49

 

Q. What is the return value of the function foo when it is called as foo (513, 2)? 

Solution:

QUESTION: 49

 

Q. What is the return value of the function foo when it is called as foo (345, 10) ? 

Solution:

QUESTION: 50

(Diretion) Common Data Questions: 50 & 51

Consider the following circuit involving three D-type flip-flops used in a certain type of counter configuration.

 

Q. If all the flip-flops were reset to 0 at power on, what is the total number of distinct outputs (states) represented by PQR generated by the counter?

Solution:

So Total number of distinct outputs is 4

QUESTION: 51

Consider the following circuit involving three D-type flip-flops used in a certain type of counter configuration.

 

Q. If at some instance prior to the occurrence of the clock edge, P. Q and R have a value 0, 1 and 0 respectively, what shall be the value of PQR after the clock edge?

Solution:

From the Table Shown in the explanation of question 50, if first state is 010 next State is 011

QUESTION: 52

 

Q. What will be the cost of the minimum spanning tree (MST) of such a graph with n nodes?

Solution:
QUESTION: 53

 

Q. The length of the path from v5 to v6 in the MST of previous question with n = 10 is 

Solution:

QUESTION: 54

Consider a network with five nodes, N1 to N5, as shown below

The net work uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following

Each distance vector is the distance of the best known path at that instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors

 

Q. The cost of link N2-N3 reduces to 2 in (both directions). After the next round of updates, what will be the new distance vector at node, N3? 

Solution:

QUESTION: 55

Consider a network with five nodes, N1 to N5, as shown below

The net work uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following

Each distance vector is the distance of the best known path at that instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors

 

Q. After the update in the previous question, the link N1-N2 goes down. N2 will reflect this change immediately in its distance vector as cost, ∞ . After the NEXT ROUND of update, what will be the cost to N1 in the distance vector of N3?

Solution:

QUESTION: 56

If Log (P) = (1/2)Log (Q) = (1/3) Log (R), then which of the following options is TRUE?

Solution:

QUESTION: 57

Choose the most appropriate word(s) from the options given below to complete the following sentence.

I contemplated________Singapore for my vacation but decided against it.

Solution:

Contemplate is a transitive verb and hence is followed by a gerund Hence the correct usage of contemplate is verb+ ing form.

QUESTION: 58

Choose the most appropriate word from the options given below to complete the following sentence.

If you are trying to make a strong impression on your audience, you cannot do so by being understated, tentative or_____________.

Solution:

The tone of the sentence clearly indicates a word that is similar to understated is needed for the blank. Alternatively, the word should be antonym of strong (fail to make strong impression). Therefore, the best choice is restrained which means controlled/reserved/timid.

QUESTION: 59

Choose the word from the options given below that is most nearly opposite in meaning to the given word:

Amalgamate

Solution:

Amalgamate means combine or unite to form one organization or structure. So the best option here is split. Separate on the other hand, although a close synonym, it is too general to be the best antonym in the given question while Merge is the synonym; Collect is not related.

QUESTION: 60

Which of the following options is the closest in the meaning to the word below:

Inexplicable

Solution:

Inexplicable means not explicable; that cannot be explained, understood, or accounted for. So the best synonym here is incomprehensible.

QUESTION: 61

P, Q, R and S are four types of dangerous microbes recently found in a human habitat. The area of each circle with its diameter printed in brackets represents the growth of a single microbe surviving human immunity system within 24 hours of entering the body. The danger to human beings varies proportionately with the toxicity, potency and growth attributed to a microbe shown in the figure below

 

Q. A pharmaceutical company is contemplating the development of a vaccine against the most dangerous microbe. Which microbe should the company target in its first attempt?

Solution:

By observation of the table, we can say S

QUESTION: 62

The variable cost (V) of manufacturing a product varies according to the equation V= 4q, where q is the quantity produced. The fixed cost (F) of production of same product reduces with q according to the equation F = 100/q. How many units should be produced to minimize the total cost (V+F)?

Solution:

Checking with all options in formula: (4q+100/q) i.e. (V+F). Option A gives the minimum cost.

QUESTION: 63

A transporter receives the same number of orders each day. Currently, he has some pending orders (backlog) to be shipped. If he uses 7 trucks, then at the end of the 4th day he can clear all the orders. Alternatively, if he uses only 3 trucks, then all the orders are cleared at the end of the 10th day. What is the minimum number of trucks required so that there will be no pending order at the end of the 5th day?

Solution:

Let each truck carry 100 units.

2800 = 4n + e    n = normal

3000 = 10n + e    e = excess/pending

Minimum possible = 6

QUESTION: 64

A container originally contains 10 litres of pure spirit. From this container 1 litre of spirit is replaced with 1 litre of water. Subsequently, 1 litre of the mixture is again replaced with 1 litre of water and this process is repeated one more time.
How much spirit is now left in the container?

Solution:

QUESTION: 65

Few school curricula include a unit on how to deal with bereavement and grief, and yet all students at some point in their lives suffer from losses through death and parting.

 

Q. Based on the above passage which topic would not be included in a unit on bereavement?

Solution:

The given passage clearly deals with how to deal with bereavement and grief and so after the tragedy occurs and not about precautions. Therefore, irrespective of the causes of death, a school student rarely gets into details of causes—which is beyond the scope of the context. Rest all are important in dealing with grief.