CS and IT GATE 2015 Set-3 Questions with Answer

Ques 1 Aptitude


The head of a newly formed government desires to appoint five of the six selected members P, Q, R, S, T and U to portfolios of Home, Power, Defence, Telecom, and Finance.

U does not want any portfolio if S gets one of the five.
R wants either Home or Finance or no portfolio.
Q says that if S gets either Power of telecom, then she must get the other one.
T insists on a portfolio if P gets one.

Which is the valid distribution of portfolios?

A

P-Home, Q-Power, R-Defence, S-Telecom, T-Finance

B

R-Home, S-Power, P-Defence, Q-Telecom, T-Finance

C

P-Home, Q-Power, T-Defence, S-Telecom, U-Finance

D

Q-Home, U-Power, T-Defence, R-Telecom, P-Finance



Ques 2 Aptitude


Alexander turned his attention towards India, since he had conquered Persia.

Which one of the statements below is logically valid and can be inferred from the above sentence?

A

Alexander would not have turned his attention towards India had he not conquered Persia.

B

Alexander was not ready to rest on his laurels, and wanted to march to India.

C

Alexander was not completely in control of his army and could command it to move towards India.

D

Since Alexander's kingdom extended to Indian borders after the conquest of Persia, he was keen to move further.



Ques 3 Aptitude


Select the pair that best expresses a relationship similar to that expressed in the pair:

Children : Pediatrician

A

Adult : Orthopaedist

B

Females : Gynaecologist

C

Kidney : Nephrologist

D

Skin : Dermatologist



Ques 4 Aptitude


Extreme focus on syllabus and studying for tests has become such a dominant concern of Indian students that they close their minds to anything ________ to the requirements of the exam.

A

related

B

extraneous

C

outside

D

useful



Ques 5 Aptitude


The Tamil version of ________ John Abraham-starrer Madras Cafe _____ cleared by the Censor Board with no cuts last week, but the film’s distributors ______ no takers among the exhibitors for a release in Tamil Nadu _________ this Friday.

A

Mr., was, found, on

B

a, was, found, at

C

the, was, found, on

D

a, being, find at



Ques 6 Aptitude


If ROAD is written as URDG, then SWAN should be written as

A

VXDQ

B

VZDQ

C

VZDP

D

UXDQ



Ques 7 Aptitude


Most experts feel that in spite of possessing all the technical skills required to be a batsman of the highest order, he is unlikely to be so due to lack of requisite temperament. He was guilty of throwing away his wicket several times after working hard to lay a strong foundation. His critics pointed out that until he addressed this problem, success at the highest level will continue to elude him. Which of the statements(s) below is/are logically valid and can be inferred from the above passage?

(i) He was already a successful batsman at the highest level.
(ii) He has to improve his temperament in order to become a great batsman.
(iii) He failed to make many of his good starts count.
(iv) Improving his technical skills will guarantee success.

A

(iii) and (iv)

B

(ii) and (iii)

C

(ii) only

D

(i), (ii) and (iii)



Ques 8 C Programming


Consider the following C program.

# include<stdio.h>
int main( )
{
    static int a[] = {10, 20, 30, 40, 50};
    static int *p[] = {a, a+3, a+4, a+1, a+2};
    int **ptr = p;
    ptr++;
    printf("%d%d", ptr - p, **ptr};
}


The output of the program is _________


a is the correct answer.


Ques 9 C Programming


Consider the following two C code segments. Y and X are one and two dimensional arrays of size n and n × n respectively, where 2 ≤ n ≤ 10. Assume that in both code segments, elements of Y are initialized to 0 and each element X[i][j] of array X is initialized to i + j. Further assume that when stored in main memory all elements of X are in same main memory page frame.

Code segment 1:
// initialize elements of Y to 0
// initialize elements X[i][j] of X to i+j
for (i = 0; i < n; i++)
    y[i] + = X[0][i];

Code segment 2:
// initialize elements of Y to 0
// initialize elements X[i][j] of X to i+j
for (i = 0; i < n; i++)
    y[i] + = X[i][0];

Which of the following statements is/are correct?

S1: Final contents of array Y will be same in both code segments.
S2: Elements of array X accessed inside the for loop shown in code segment 1 are contiguous in main memory.
S3: Elements of array X accessed inside the for loop shown in code segment 2 are contiguous in main memory.

A

Only S2 is correct

B

Only S3 is correct

C

Only S1 and S2 are correct

D

Only S1 and S3 are correct



Ques 10 C Programming


Consider the following C program segment.

#include<stdio.h>
int main( )
{
    char s1[7] = "1234", *p;
    p = s1 + 2;
    *p = '0' ;
    printf ("%s", s1);
}


What will be printed by the program?

A

12

B

120400

C

1204

D

1034



Ques 11 COA


Consider a machine with a byte addressable main memory of 220 bytes, block size of 16 bytes and a direct mapped cache having 212 cache lines. Let the addresses of two consecutive bytes in main memory be (E201F)16 and (E2020)16. What are the tag and cache line address (in hex) for main memory address (E201F)16?

A

E, 201

B

F, 201

C

E, E20

D

2, 01F



Ques 12 Compiler Design


Consider the following grammar G.

S → F ⎪ H
F → p ⎪ c
H → d ⎪ c

Where S, F and H are non-terminal symbols, p, d and c are terminal symbols. Which of the following statement(s) is/are correct?

S1: LL(1) can parse all strings that are generated using grammar G.
S2: LR(1) can parse all strings that are generated using grammar G.

A

Only S1

B

Only S2

C

Both S1 and S2

D

Neither S1 and S2



Ques 13 Compiler Design


Among simple LR (SLR), canonical LR, and look-ahead LR (LALR), which of the following pairs identify the method that is very easy to implement and the method that is the most powerful, in that order?

A

SLR, LALR

B

Canonical LR, LALR

C

SLR, canonical LR

D

LALR, canonical LR



Unique Visitor Count

Total Unique Visitors

Loading......