Print Page | Close Window

CSE GATE sample papers

Printed From: One Stop GATE
Category: GATE Previous Years Test Papers - Discuss Here
Forum Name: CS Papers
Forum Discription: Computer Science Previous Year GATE Papers to can discussed here.
URL: http://forum.onestopgate.com/forum_posts.asp?TID=47
Printed Date: 06Feb2025 at 11:29pm


Topic: CSE GATE sample papers
Posted By: Arpita
Subject: CSE GATE sample papers
Date Posted: 04Jan2007 at 6:43pm


1 Consider the following C function
void swap (int a, int b) 
{ int temp ;
temp     = a ;
a =   b ;
b = temp ;
}
In order to exchange the values of two variables x and y.
Options
A) call swap (x, y)
B) call swap (&x, &y)
C) swap (x, y) cannot be used as it does not return any value D) swap (x, y) cannot be used as the parameters are passed by value


Correct Answer B

2 A 5 stage pipelined CPU has the following sequence of stages:
IF - Instruction fetch from instruction memory,
RD - Instruction decode and register read,
EX - Execute: ALU operation for data and address computation,
MA - Data memory access - for write access, the register read at RD stage is used,
WB - Register write back.
Consider the following sequence of instructions:
I1 : L R0, 1oc1;  R0 <= M[1oc1]
I2 : A R0, R0;      R0 <= R0 + R0
I3: A R2, R0;      R2 <= R2 - R0
Let each stage take one clock cycle.
What is the number of clock cycles taken to complete the above sequence of instructions starting from the fetch of I1?
Options
A) 8 B) 10
C) 12 D) 15


Correct Answer A

3 The address resolution protocol (ARP) is used for
Options
A) Finding the IP address from the DNS B) Finding the IP address of the default gateway
C) Finding the IP address that corresponds to a MAC address D) Finding the MAC address that corresponds to an IP address


Correct Answer D

4 Consider the following relation schema pertaining to a students database:
Student (rollno, name, address)
Enroll (rollno, courseno, coursename)
where the primary keys are shown underlined. The number of tuples in the Student and Enroll tables are 120 and 8 respectively. What are the maximum and minimum number of tuples that can be present in (Student * Enroll), where ‘*’denotes natural join?
Options
A) 8, 8  B) 120, 8
C) 960, 8  D) 960, 120


Correct Answer C

5 Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number of bits needed for cache indexing and the number of tag bits are respectively
Options
A) 10, 17 B) 10, 22
C) 15, 17  D) 5, 17


Correct Answer A

6 Which one of the following is a key factor for preferring B+ -trees to binary search trees for indexing database relations?
Options
A) Database relations have a large number of records B) Database relations are sorted on the primary key
C) B+ -trees require less memory than binary search trees D) Data transfer from disks is in blocks


Correct Answer D

7 The goal of structured programming is to
Options
A) have well indented programs B) be able to infer the flow of control from the compiled code
C) be able to infer the flow of control from the program text D) avoid the use of GOTO statements


Correct Answer C

8 The tightest lower bound on the number of comparisons, in the worst ease, for comparison-based sorting is of the order of
Options
A) n B) n2
C) n log n D) n log2 n


Correct Answer B

9 Consider the following two problems on undirected graphs
a: Given G(V, E), does G have an independent set of size |V| -4?
b: Given G(V, E), does G have an independent set of size 5?
Which one of the following is TRUE?
Options
A) a is in P and b is NP-complete B) a is NP-complete and b is in P
C) Both a and b are NP-complete  D) Both a and b are in P


Correct Answer C

10 Consider the languages
L1 = {wwR | w Î{0, 1}*}
L2 = {w# wR | w Î{0, 1}*}, where # is a special symbol
L3 = {ww | w Î{0, 1}*}
Which one of the following is TRUE?
Options
A) L1 is a deterministic CFL B) L2 is a deterministic CFL
C) L3 is a CFL, but not a deterministic CFL D) L3 is a deterministic CFL


Correct Answer B



-------------
For more papers visit:
http://onestopgate.com/gate-preparation/ - http://onestopgate.com/gate-preparation/



Print Page | Close Window