Computer Science Gate 2015 Set 2 Questions



Ques 1Aptitude

If p, q, r, s are distinct integers such that:

f(p, q, r, s) = max (p, q, r, s)
g(p, q, r, s) = min (p, q, r, s)
h(p, q, r, s) = remainder of (p × q) / (r × s) if (p × q) > (r × s) OR remainder of (r × s) / (p × q) if (r × s) > (p × q)
Also a function fgh (p, q, r, s) = f(p, q, r, s) × g(p, q, r, s) × h(p, q, r, s).

Also the same operation are valid with two variable functions of the form f(p, q).

What is the value of fg(h(2, 5, 7, 3), 4, 6, 8)?


a is the correct answer.




Ques 2Aptitude

Out of the following four sentences, select the most suitable sentence with respect to grammar and usage

a) Since the report lacked needed information, it was of no use to them
b) The report was useless to them because there were no needed information in it
c) Since the report did not contain the needed information, it was not real useful to them
d) Since the report lacked needed information, it would not had been useful to them


English Grammar is the correct answer.




Ques 3Aptitude

If the list of letters, P, R, S, T, U is an arithmetic sequence, which of the following are also in arithmetic sequence?

I. 2P, 2R, 2S, 2T, 2U
II. P–3, R–3, S–3, T–3, U–3
III. P2, R2, S2, T2, U2

a) I only
b) I and II
c) II and III
d) I and III


Reasoning is the correct answer.




Ques 4Aptitude

Four branches of a company are located at M, N, O and P. M is north of N at a distance of 4 km; P is south of O at a distance of 2 km; N is southeast of O by 1 km. What is the distance between M and P in km?

a) 5.34
b) 6.74
c) 28.5
d) 45.49


Distance Time is the correct answer.




Ques 5Aptitude

A generic term that includes various items of clothing such as a skirt, a pair of trousers and a shirt is

a) fabric
b) textile
c) fibre
d) apparel


English Grammar is the correct answer.




Ques 6Aptitude

Based on the given statements, select the most appropriate option to solve the given question. What will be the total weight of 10 poles each of same weight?

Statements:

(I) One fourth of the weight of a pole is 5 kg
(II) The total weight of these poles is 160 kg more
than the total weight of two poles.

a) Statement I alone is not sufficient
b) Statement II alone is not sufficient
c) Either I or II alone is sufficient
d) Both statements I and II together are not sufficient.


Aptitude is the correct answer.




Ques 7Aptitude

Choose the statement where underlined word is used correctly.

a) The industrialist had a personnel jet
b) I write my experience in my personnel diary
c) All personnel are being given the day off
d) Being religious is a personnel aspect


English Grammar is the correct answer.




Ques 8Aptitude

We __________ our friend’s birthday and we ________ how to make it up to him.

a) Completely forgot --- don’t just know
b) Forgot completely --- don’t just know
c) Completely forgot --- just don’t know
d) Completely forgot --- just don’t know


English Grammar is the correct answer.




Ques 9C

Consider the following C function.

int fun (int n)
{
    int x=1, k;
    if (n==1) return x;
    for (k=1; k < n; ++k)
        x = x + fun(k) * fun(n – k);
    return x;
}


The return value of fun(5) is __________.


a is the correct answer.




Ques 10C

Consider the following function written in the C programming language.

void foo (char *a)
{
    if (*a && *a != ` `)
    {
        foo(a+1);
        putchar(*a);
    }
}


The output of the above function on input “ABCD  EFGH” is

a) ABCD EFGH
b) ABCD
c) HGFE DCBA
d) DCBA


C Code is the correct answer.




Ques 11Compiler

In the context of abstract-syntax-tree (AST) and control-flow-graph (CFG), which one of the following is True?

a) In both AST and CFG, let node N2 be the successor of node N1. In the input program, the code corresponding to N2 is present after the code corresponding to N1.
b) For any input program, neither AST nor CFG will contain a cycle.
c) The maximum number of successors of a node in an AST and a CFG depends on the input program.
d) Each node in AST and CFG corresponds to at most one statement in the input program.


CFG is the correct answer.




Ques 12Computer Network

A link has a transmission speed of 106 bits/sec. It uses data packets of size 1000 bytes each. Assume that the acknowledgment has negligible transmission delay, and that its propagation delay is the same as the data propagation delay. Also assume that the processing delays at nodes are negligible. The efficiency of the stop-and-wait protocol in this setup is exactly 25%. The value of the one-way propagation delay (in milliseconds) is ___________.


a is the correct answer.




Ques 13Computer Network

Which one of the following statements is NOT correct about HTTP cookies?

a) A cookies is a piece of code that has the potential to compromise the security of an Internet user.
b) A cookie gains entry to the user’s work area through an HTTP header.
c) A cookie has an expiry date and time.
d) Cookies can be used to track the browsing pattern of a user at a particular site.


HTTP Protocal is the correct answer.




Ques 14DAA

Consider two decision problems Q1, Q2 such that Q1 reduces in polynomial time to 3-SAT and 3-SAT reduces in polynomial time to Q2. Then which one of the following is consistent with the above statement?

a) Q1 is in NP, Q2 is NP hard
b) Q2 is in NP, Q1 is NP hard
c) Both Q1 and Q2 are in NP
d) Both Q1 and Q2 are in NP hard


NP Hard Problem is the correct answer.




Ques 15Data Structure

A binary tree T has 20 leaves. The number of nodes in T having two children is ________


a is the correct answer.




Ques 16Data Structure

Consider a complete binary tree where the left and the right subtrees of the root are max-heaps. The lower bound for the number of operations to convert the tree to a heap is

a) Ω(logn)
b) Ω(n)
c) Ω(nlogn)
d) Ω(n2)


Complexity is the correct answer.




Ques 17DBMS

Consider the following transaction involving two bank accounts x and y.

read(x); x := x – 50; write(x); read(y); y := y + 50; write(y)

The constraint that the sum of the accounts x and y should remain constant is that of

a) Atomicity
b) Consistency
c) Isolation
d) Durability


Transactions is the correct answer.




Ques 18Digital Logic

The minimum number of JK flip-flops required to construct a synchronous counter with the count sequence (0, 0, 1, 1, 2, 2, 3, 3, 0, 0,...) is ________


a is the correct answer.




Ques 19Discrete Mathematics

Let R be the relation on the set of positive integers such that aRb if and only if a and b are distinct and have a common divisor other than 1. Which one of the following statements about R is True?

a) R is symmetric and reflexive but not transitive
b) R is reflexive but not symmetric and not transitive
c) R is transitive but not reflexive and not symmetric
d) R is symmetric but not reflexive and not transitive


Relation is the correct answer.




Ques 20Discrete Mathematics

Consider the following two statements.

S1: If a candidate is known to be corrupt, then he will not be elected.
S2: If a candidate is kind, he will be elected.

Which one of the following statements follows from S1 and S2 as per sound inference rules of logic?

a) If a person is known to be corrupt, he is kind
b) If a person is not known to be corrupt, he is not kind
c) If a person is kind, he is not known to be corrupt
d) If a person is not kind, he is not known to be corrupt


Propositional Logic is the correct answer.




Ques 21Mathematics

The number of divisors of 2100 is _________.


a is the correct answer.




Ques 22Mathematics

Consider a function f(x) = 1 – |x| on –1 ≤ x ≤ 1. The value of x at which the function attains a maximum and the maximum value of the function are:

a) 0, –1
b) –1, 0
c) 0, 1
d) –1, 2


Mathematics is the correct answer.




Ques 23Software Engineering

Consider the basic COCOMO model where E is the effort applied in person-months, D is the development time in chronological months, KLOC is the estimated number of delivered lines of code (in thousands) and ab, bb, cb, db have their usual meanings. The basic COCOMO equations are of the form.

a) E = ab(KLOC) exp(bb), D = cb(E) exp(db)
b) D = ab(KLOC) exp(bb), E = cb(D) exp(db)
c) E = abexp(bb), D = cb(KLOC) exp(db)
d) E = abexp(db), D = cb(KLOC) exp(bb)


Software Engineering is the correct answer.




Ques 24Software Engineering

A Software Requirements Specification (SRS) document should avoid discussing which one of the following?

a) User interface issues
b) Non-functional requirements
c) Design specification
d) Interfaces with third party software


SRS is the correct answer.