Gate (CS) 2012 Paper with Solution (Set A) | GATE Computer Science Engineering(CSE) 2025 Mock Test Series - Computer Science Engineering (CSE) PDF Download

Download, print and study this document offline
Please wait while the PDF view is loading
 Page 1


2012                                                                                                                           Question Booklet Code                                                                            
CS-A                                                                                                                                                                                                                                       
1/20 
CS : COMPUTER SCIENCE & INFORMATION TECHNOLOGY 
 
Duration: Three Hours                          Maximum Marks: 100 
Read the following instructions carefully. 
 
1. Do not open the seal of the Question Booklet until you are asked to do so by the invigilator. 
  
2. Take out the Optical Response Sheet (ORS) from this Question Booklet without breaking the seal 
and read the instructions printed on the ORS carefully. If you find that the Question Booklet Code 
printed at the right hand top corner of this page does not match with the Booklet Code on the ORS, 
exchange the booklet immediately with a new sealed Question Booklet.  
  
3. On the right half of the ORS, using ONLY a black ink ball point pen, (i) darken the bubble 
corresponding to your test paper code and the appropriate bubble under each digit of your registration 
number and (ii) write your registration number, your name and name of the examination centre and 
put your signature at the specified location.  
  
4. This Question Booklet contains 20 pages including blank pages for rough work. After you are 
permitted to open the seal, please check all pages and report discrepancies, if any, to the invigilator. 
  
5. There are a total of 65 questions carrying 100 marks. All these questions are of objective type. Each 
question has only one correct answer. Questions must be answered on the left hand side of the ORS 
by darkening the appropriate bubble (marked A, B, C, D) using ONLY a black ink ball point pen 
against the question number. For each question darken the bubble of the correct answer. More 
than one answer bubbled against a question will be treated as an incorrect response. 
  
6. Since bubbles darkened by the black ink ball point pen cannot be erased, candidates should darken 
the bubbles in the ORS very carefully. 
  
7. Questions Q.1 – Q.25 carry 1 mark each. Questions Q.26 – Q.55 carry 2 marks each. The 2 marks 
questions include two pairs of common data questions and two pairs of linked answer questions. The 
answer to the second question of the linked answer questions depends on the answer to the first 
question of the pair. If the first question in the linked pair is wrongly answered or is unattempted, then 
the answer to the second question in the pair will not be evaluated. 
  
8. Questions Q.56 – Q.65 belong to General Aptitude (GA) section and carry a total of 15 marks. 
Questions Q.56 – Q.60 carry 1 mark each, and questions Q.61 – Q.65 carry 2 marks each.   
 
9. Unattempted questions will result in zero mark and wrong answers will result in NEGATIVE marks.  
For all 1 mark questions, ? mark will be deducted for each wrong answer. For all 2 marks questions, 
? mark will be deducted for each wrong answer.  However, in the case of the linked answer question 
pair, there will be negative marks only for wrong answer to the first question and no negative marks 
for wrong answer to the second question.  
  
10. Calculator is allowed whereas charts, graph sheets or tables are NOT allowed in the examination hall. 
  
11. Rough work can be done on the question paper itself. Blank pages are provided at the end of the 
question paper for rough work. 
  
12. Before the start of the examination, write your name and registration number in the space provided 
below using a black ink ball point pen. 
 
Name 
 
 
Registration Number 
CS 
       
 
A 
Page 2


2012                                                                                                                           Question Booklet Code                                                                            
CS-A                                                                                                                                                                                                                                       
1/20 
CS : COMPUTER SCIENCE & INFORMATION TECHNOLOGY 
 
Duration: Three Hours                          Maximum Marks: 100 
Read the following instructions carefully. 
 
1. Do not open the seal of the Question Booklet until you are asked to do so by the invigilator. 
  
2. Take out the Optical Response Sheet (ORS) from this Question Booklet without breaking the seal 
and read the instructions printed on the ORS carefully. If you find that the Question Booklet Code 
printed at the right hand top corner of this page does not match with the Booklet Code on the ORS, 
exchange the booklet immediately with a new sealed Question Booklet.  
  
3. On the right half of the ORS, using ONLY a black ink ball point pen, (i) darken the bubble 
corresponding to your test paper code and the appropriate bubble under each digit of your registration 
number and (ii) write your registration number, your name and name of the examination centre and 
put your signature at the specified location.  
  
4. This Question Booklet contains 20 pages including blank pages for rough work. After you are 
permitted to open the seal, please check all pages and report discrepancies, if any, to the invigilator. 
  
5. There are a total of 65 questions carrying 100 marks. All these questions are of objective type. Each 
question has only one correct answer. Questions must be answered on the left hand side of the ORS 
by darkening the appropriate bubble (marked A, B, C, D) using ONLY a black ink ball point pen 
against the question number. For each question darken the bubble of the correct answer. More 
than one answer bubbled against a question will be treated as an incorrect response. 
  
6. Since bubbles darkened by the black ink ball point pen cannot be erased, candidates should darken 
the bubbles in the ORS very carefully. 
  
7. Questions Q.1 – Q.25 carry 1 mark each. Questions Q.26 – Q.55 carry 2 marks each. The 2 marks 
questions include two pairs of common data questions and two pairs of linked answer questions. The 
answer to the second question of the linked answer questions depends on the answer to the first 
question of the pair. If the first question in the linked pair is wrongly answered or is unattempted, then 
the answer to the second question in the pair will not be evaluated. 
  
8. Questions Q.56 – Q.65 belong to General Aptitude (GA) section and carry a total of 15 marks. 
Questions Q.56 – Q.60 carry 1 mark each, and questions Q.61 – Q.65 carry 2 marks each.   
 
9. Unattempted questions will result in zero mark and wrong answers will result in NEGATIVE marks.  
For all 1 mark questions, ? mark will be deducted for each wrong answer. For all 2 marks questions, 
? mark will be deducted for each wrong answer.  However, in the case of the linked answer question 
pair, there will be negative marks only for wrong answer to the first question and no negative marks 
for wrong answer to the second question.  
  
10. Calculator is allowed whereas charts, graph sheets or tables are NOT allowed in the examination hall. 
  
11. Rough work can be done on the question paper itself. Blank pages are provided at the end of the 
question paper for rough work. 
  
12. Before the start of the examination, write your name and registration number in the space provided 
below using a black ink ball point pen. 
 
Name 
 
 
Registration Number 
CS 
       
 
A 
2012                                                                                                                                            COMPUTER SCIENCE & INFORMATION TECH. –  CS 
CS-A 2/20 
Q. 1 – Q. 25 carry one mark each. 
Q.1  Consider the following logical inferences. 
 
I
1
:  If it rains then the cricket match will not be played.  
     The cricket match was played. 
      Inference: There was no rain. 
I
2
:  If it rains then the cricket match will not be played.  
     It did not rain. 
     Inference: The cricket match was played. 
 
Which of the following is TRUE? 
(A) Both I
1
 and I
2
 are correct inferences 
(B) I
1 
is correct but I
2
 is not a correct inference 
(C) I
1
 is not correct but I
2
 is a correct inference 
(D) Both I
1
 and I
2
 are not correct inferences 
 
Q.2  Which of the following is TRUE? 
(A) Every relation in 3NF is also in BCNF 
(B) A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every     
 key of R 
(C) Every relation in BCNF is also in 3NF 
(D) No relation can be in both BCNF and 3NF 
 
Q.3  What will be the output of the following C program segment? 
 
char inChar = ‘A’ ; 
switch ( inChar ) { 
case ‘A’ : printf (“Choice A\ n”) ; 
case ‘B’ : 
case ‘C’ : printf (“Choice B”) ; 
case ‘D’ :  
case ‘E’ : 
default  : printf ( “ No Choice” ) ; } 
(A)   No Choice 
(B)   Choice A 
(C)   Choice A 
    Choice B No Choice 
(D)   Program gives no output as it is erroneous 
 
Q.4  Assuming P ? NP, which of the following is TRUE? 
(A) NP-complete = NP (B) NP-complete n P = ? 
(C) NP-hard = NP (D) P = NP-complete 
 
Q.5  The worst case running time to search for an element in a balanced binary search tree with n2
n
 
elements is 
(A) T (n log n) (B) T (n2
n
) (C)  T (n) (D) T (log n)  
 
Page 3


2012                                                                                                                           Question Booklet Code                                                                            
CS-A                                                                                                                                                                                                                                       
1/20 
CS : COMPUTER SCIENCE & INFORMATION TECHNOLOGY 
 
Duration: Three Hours                          Maximum Marks: 100 
Read the following instructions carefully. 
 
1. Do not open the seal of the Question Booklet until you are asked to do so by the invigilator. 
  
2. Take out the Optical Response Sheet (ORS) from this Question Booklet without breaking the seal 
and read the instructions printed on the ORS carefully. If you find that the Question Booklet Code 
printed at the right hand top corner of this page does not match with the Booklet Code on the ORS, 
exchange the booklet immediately with a new sealed Question Booklet.  
  
3. On the right half of the ORS, using ONLY a black ink ball point pen, (i) darken the bubble 
corresponding to your test paper code and the appropriate bubble under each digit of your registration 
number and (ii) write your registration number, your name and name of the examination centre and 
put your signature at the specified location.  
  
4. This Question Booklet contains 20 pages including blank pages for rough work. After you are 
permitted to open the seal, please check all pages and report discrepancies, if any, to the invigilator. 
  
5. There are a total of 65 questions carrying 100 marks. All these questions are of objective type. Each 
question has only one correct answer. Questions must be answered on the left hand side of the ORS 
by darkening the appropriate bubble (marked A, B, C, D) using ONLY a black ink ball point pen 
against the question number. For each question darken the bubble of the correct answer. More 
than one answer bubbled against a question will be treated as an incorrect response. 
  
6. Since bubbles darkened by the black ink ball point pen cannot be erased, candidates should darken 
the bubbles in the ORS very carefully. 
  
7. Questions Q.1 – Q.25 carry 1 mark each. Questions Q.26 – Q.55 carry 2 marks each. The 2 marks 
questions include two pairs of common data questions and two pairs of linked answer questions. The 
answer to the second question of the linked answer questions depends on the answer to the first 
question of the pair. If the first question in the linked pair is wrongly answered or is unattempted, then 
the answer to the second question in the pair will not be evaluated. 
  
8. Questions Q.56 – Q.65 belong to General Aptitude (GA) section and carry a total of 15 marks. 
Questions Q.56 – Q.60 carry 1 mark each, and questions Q.61 – Q.65 carry 2 marks each.   
 
9. Unattempted questions will result in zero mark and wrong answers will result in NEGATIVE marks.  
For all 1 mark questions, ? mark will be deducted for each wrong answer. For all 2 marks questions, 
? mark will be deducted for each wrong answer.  However, in the case of the linked answer question 
pair, there will be negative marks only for wrong answer to the first question and no negative marks 
for wrong answer to the second question.  
  
10. Calculator is allowed whereas charts, graph sheets or tables are NOT allowed in the examination hall. 
  
11. Rough work can be done on the question paper itself. Blank pages are provided at the end of the 
question paper for rough work. 
  
12. Before the start of the examination, write your name and registration number in the space provided 
below using a black ink ball point pen. 
 
Name 
 
 
Registration Number 
CS 
       
 
A 
2012                                                                                                                                            COMPUTER SCIENCE & INFORMATION TECH. –  CS 
CS-A 2/20 
Q. 1 – Q. 25 carry one mark each. 
Q.1  Consider the following logical inferences. 
 
I
1
:  If it rains then the cricket match will not be played.  
     The cricket match was played. 
      Inference: There was no rain. 
I
2
:  If it rains then the cricket match will not be played.  
     It did not rain. 
     Inference: The cricket match was played. 
 
Which of the following is TRUE? 
(A) Both I
1
 and I
2
 are correct inferences 
(B) I
1 
is correct but I
2
 is not a correct inference 
(C) I
1
 is not correct but I
2
 is a correct inference 
(D) Both I
1
 and I
2
 are not correct inferences 
 
Q.2  Which of the following is TRUE? 
(A) Every relation in 3NF is also in BCNF 
(B) A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every     
 key of R 
(C) Every relation in BCNF is also in 3NF 
(D) No relation can be in both BCNF and 3NF 
 
Q.3  What will be the output of the following C program segment? 
 
char inChar = ‘A’ ; 
switch ( inChar ) { 
case ‘A’ : printf (“Choice A\ n”) ; 
case ‘B’ : 
case ‘C’ : printf (“Choice B”) ; 
case ‘D’ :  
case ‘E’ : 
default  : printf ( “ No Choice” ) ; } 
(A)   No Choice 
(B)   Choice A 
(C)   Choice A 
    Choice B No Choice 
(D)   Program gives no output as it is erroneous 
 
Q.4  Assuming P ? NP, which of the following is TRUE? 
(A) NP-complete = NP (B) NP-complete n P = ? 
(C) NP-hard = NP (D) P = NP-complete 
 
Q.5  The worst case running time to search for an element in a balanced binary search tree with n2
n
 
elements is 
(A) T (n log n) (B) T (n2
n
) (C)  T (n) (D) T (log n)  
 
2012                                                                                                                                            COMPUTER SCIENCE & INFORMATION TECH. –  CS 
CS-A 3/20 
Q.6  The truth table  
X Y f (X, Y) 
0 0 0 
0 1 0 
1 0 1 
1 1 1 
represents the Boolean function 
(A) X (B) X + Y 
(C)  X ? Y 
(D)  Y 
 
Q.7  The decimal value 0.5 in IEEE single precision floating point representation has 
(A) fraction bits of 000…000 and exponent value of 0 
(B) fraction bits of 000…000 and exponent value of -1 
(C) fraction bits of 100…000 and exponent value of 0 
(D) no exact representation 
 
Q.8  A process executes the code 
             fork(); 
             fork(); 
             fork(); 
The total number of child processes created is 
(A) 3 (B) 4 (C)  7 (D)  8 
 
Q.9  
Consider the function f(x) = sin(x) in the interval x ? [p/4, 7p/4]. The number and location(s) of the 
local minima of this function are 
(A) One, at p/2 
(B) One, at 3p/2 
(C) Two, at p/2 and 3p/2 
(D) Two, at p/4 and 3p/2 
 
Q.10  The protocol data unit (PDU) for the application layer in the Internet stack is 
(A) Segment (B) Datagram (C)  Message (D)  Frame 
 
Q.11  Let A be the 2 × 2 matrix with elements a
11
 = a
12 
= a
21 
= +1 and a
22 
= -1. Then the eigenvalues of 
the matrix A
19 
 are 
(A) 1024 and -1024 (B) 1024v2 and -1024v2 
(C) 4v2 and -4v2 (D) 512v2 and -512v2 
 
Q.12  What is the complement of the language accepted by the NFA shown below?  
Assume ? = {a} and ? is the empty string. 
 
 
(A) ? (B) { ?} (C)  a
*
 
(D)  {a , ?} 
 
? 
a 
? 
Page 4


2012                                                                                                                           Question Booklet Code                                                                            
CS-A                                                                                                                                                                                                                                       
1/20 
CS : COMPUTER SCIENCE & INFORMATION TECHNOLOGY 
 
Duration: Three Hours                          Maximum Marks: 100 
Read the following instructions carefully. 
 
1. Do not open the seal of the Question Booklet until you are asked to do so by the invigilator. 
  
2. Take out the Optical Response Sheet (ORS) from this Question Booklet without breaking the seal 
and read the instructions printed on the ORS carefully. If you find that the Question Booklet Code 
printed at the right hand top corner of this page does not match with the Booklet Code on the ORS, 
exchange the booklet immediately with a new sealed Question Booklet.  
  
3. On the right half of the ORS, using ONLY a black ink ball point pen, (i) darken the bubble 
corresponding to your test paper code and the appropriate bubble under each digit of your registration 
number and (ii) write your registration number, your name and name of the examination centre and 
put your signature at the specified location.  
  
4. This Question Booklet contains 20 pages including blank pages for rough work. After you are 
permitted to open the seal, please check all pages and report discrepancies, if any, to the invigilator. 
  
5. There are a total of 65 questions carrying 100 marks. All these questions are of objective type. Each 
question has only one correct answer. Questions must be answered on the left hand side of the ORS 
by darkening the appropriate bubble (marked A, B, C, D) using ONLY a black ink ball point pen 
against the question number. For each question darken the bubble of the correct answer. More 
than one answer bubbled against a question will be treated as an incorrect response. 
  
6. Since bubbles darkened by the black ink ball point pen cannot be erased, candidates should darken 
the bubbles in the ORS very carefully. 
  
7. Questions Q.1 – Q.25 carry 1 mark each. Questions Q.26 – Q.55 carry 2 marks each. The 2 marks 
questions include two pairs of common data questions and two pairs of linked answer questions. The 
answer to the second question of the linked answer questions depends on the answer to the first 
question of the pair. If the first question in the linked pair is wrongly answered or is unattempted, then 
the answer to the second question in the pair will not be evaluated. 
  
8. Questions Q.56 – Q.65 belong to General Aptitude (GA) section and carry a total of 15 marks. 
Questions Q.56 – Q.60 carry 1 mark each, and questions Q.61 – Q.65 carry 2 marks each.   
 
9. Unattempted questions will result in zero mark and wrong answers will result in NEGATIVE marks.  
For all 1 mark questions, ? mark will be deducted for each wrong answer. For all 2 marks questions, 
? mark will be deducted for each wrong answer.  However, in the case of the linked answer question 
pair, there will be negative marks only for wrong answer to the first question and no negative marks 
for wrong answer to the second question.  
  
10. Calculator is allowed whereas charts, graph sheets or tables are NOT allowed in the examination hall. 
  
11. Rough work can be done on the question paper itself. Blank pages are provided at the end of the 
question paper for rough work. 
  
12. Before the start of the examination, write your name and registration number in the space provided 
below using a black ink ball point pen. 
 
Name 
 
 
Registration Number 
CS 
       
 
A 
2012                                                                                                                                            COMPUTER SCIENCE & INFORMATION TECH. –  CS 
CS-A 2/20 
Q. 1 – Q. 25 carry one mark each. 
Q.1  Consider the following logical inferences. 
 
I
1
:  If it rains then the cricket match will not be played.  
     The cricket match was played. 
      Inference: There was no rain. 
I
2
:  If it rains then the cricket match will not be played.  
     It did not rain. 
     Inference: The cricket match was played. 
 
Which of the following is TRUE? 
(A) Both I
1
 and I
2
 are correct inferences 
(B) I
1 
is correct but I
2
 is not a correct inference 
(C) I
1
 is not correct but I
2
 is a correct inference 
(D) Both I
1
 and I
2
 are not correct inferences 
 
Q.2  Which of the following is TRUE? 
(A) Every relation in 3NF is also in BCNF 
(B) A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every     
 key of R 
(C) Every relation in BCNF is also in 3NF 
(D) No relation can be in both BCNF and 3NF 
 
Q.3  What will be the output of the following C program segment? 
 
char inChar = ‘A’ ; 
switch ( inChar ) { 
case ‘A’ : printf (“Choice A\ n”) ; 
case ‘B’ : 
case ‘C’ : printf (“Choice B”) ; 
case ‘D’ :  
case ‘E’ : 
default  : printf ( “ No Choice” ) ; } 
(A)   No Choice 
(B)   Choice A 
(C)   Choice A 
    Choice B No Choice 
(D)   Program gives no output as it is erroneous 
 
Q.4  Assuming P ? NP, which of the following is TRUE? 
(A) NP-complete = NP (B) NP-complete n P = ? 
(C) NP-hard = NP (D) P = NP-complete 
 
Q.5  The worst case running time to search for an element in a balanced binary search tree with n2
n
 
elements is 
(A) T (n log n) (B) T (n2
n
) (C)  T (n) (D) T (log n)  
 
2012                                                                                                                                            COMPUTER SCIENCE & INFORMATION TECH. –  CS 
CS-A 3/20 
Q.6  The truth table  
X Y f (X, Y) 
0 0 0 
0 1 0 
1 0 1 
1 1 1 
represents the Boolean function 
(A) X (B) X + Y 
(C)  X ? Y 
(D)  Y 
 
Q.7  The decimal value 0.5 in IEEE single precision floating point representation has 
(A) fraction bits of 000…000 and exponent value of 0 
(B) fraction bits of 000…000 and exponent value of -1 
(C) fraction bits of 100…000 and exponent value of 0 
(D) no exact representation 
 
Q.8  A process executes the code 
             fork(); 
             fork(); 
             fork(); 
The total number of child processes created is 
(A) 3 (B) 4 (C)  7 (D)  8 
 
Q.9  
Consider the function f(x) = sin(x) in the interval x ? [p/4, 7p/4]. The number and location(s) of the 
local minima of this function are 
(A) One, at p/2 
(B) One, at 3p/2 
(C) Two, at p/2 and 3p/2 
(D) Two, at p/4 and 3p/2 
 
Q.10  The protocol data unit (PDU) for the application layer in the Internet stack is 
(A) Segment (B) Datagram (C)  Message (D)  Frame 
 
Q.11  Let A be the 2 × 2 matrix with elements a
11
 = a
12 
= a
21 
= +1 and a
22 
= -1. Then the eigenvalues of 
the matrix A
19 
 are 
(A) 1024 and -1024 (B) 1024v2 and -1024v2 
(C) 4v2 and -4v2 (D) 512v2 and -512v2 
 
Q.12  What is the complement of the language accepted by the NFA shown below?  
Assume ? = {a} and ? is the empty string. 
 
 
(A) ? (B) { ?} (C)  a
*
 
(D)  {a , ?} 
 
? 
a 
? 
2012                                                                                                                                            COMPUTER SCIENCE & INFORMATION TECH. –  CS 
CS-A 4/20 
Q.13  What is the correct translation of the following statement into mathematical logic? 
“Some real numbers are rational” 
(A) ?x (real(x) ? rational(x)) 
(B) ?x (real(x) ? rational(x)) 
(C) ?x (real(x) ? rational(x)) 
(D) ?x (rational(x) ? real(x)) 
 
Q.14  Given the basic ER and relational models, which of the following is INCORRECT? 
(A) An attribute of an entity can have more than one value 
(B) An attribute of an entity can be composite 
(C) In a row of a relational table, an attribute can have more than one value 
(D) In a row of a relational table, an attribute can have exactly one value or a NULL value 
 
Q.15  Which of the following statements are TRUE about an SQL query? 
 
P : An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause 
Q : An SQL query can contain a HAVING clause only if it has a GROUP BY clause 
R : All attributes used in the GROUP BY clause must appear in the SELECT clause 
S : Not all attributes used in the GROUP BY clause need to appear in the SELECT clause 
(A) P and R (B) P and S (C)  Q and R  (D)  Q and S 
 
Q.16  The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with 
n discs is  
(A) T(n) = 2T(n - 2) + 2 (B) T(n) = 2T(n - 1) + n 
(C) T(n) = 2T(n/2) + 1 (D) T(n) = 2T(n - 1) + 1 
 
Q.17  Let G be a simple undirected planar graph on 10 vertices with 15 edges. If G is a connected graph, 
then the number of bounded faces in any embedding of G on the plane is equal to 
(A) 3 (B) 4 (C)  5 (D)  6 
 
Q.18  Let W(n) and A(n) denote respectively, the worst case and average case running time of an 
algorithm executed on an input of size n.  Which of the following is ALWAYS TRUE? 
(A) A(n) = O (W(n)) (B) A(n) = T (W(n)) 
(C) A(n) = O (W(n)) (D) A(n) = o (W(n)) 
 
Q.19  The amount of ROM needed to implement a 4 bit multiplier is 
(A) 64 bits (B) 128 bits (C)  1 Kbits (D)  2 Kbits 
 
Q.20  Register renaming is done in pipelined processors 
(A) as an alternative to register allocation at compile time 
(B) for efficient access to function parameters and local variables 
(C) to handle certain kinds of hazards 
(D) as part of address translation 
 
Q.21  Consider a random variable X that takes values +1 and -1 with probability 0.5 each. The values of 
the cumulative distribution function F(x) at x = -1 and +1 are 
(A) 0 and 0.5 (B) 0 and 1 (C)  0.5 and 1 (D)  0.25 and 0.75 
 
Page 5


2012                                                                                                                           Question Booklet Code                                                                            
CS-A                                                                                                                                                                                                                                       
1/20 
CS : COMPUTER SCIENCE & INFORMATION TECHNOLOGY 
 
Duration: Three Hours                          Maximum Marks: 100 
Read the following instructions carefully. 
 
1. Do not open the seal of the Question Booklet until you are asked to do so by the invigilator. 
  
2. Take out the Optical Response Sheet (ORS) from this Question Booklet without breaking the seal 
and read the instructions printed on the ORS carefully. If you find that the Question Booklet Code 
printed at the right hand top corner of this page does not match with the Booklet Code on the ORS, 
exchange the booklet immediately with a new sealed Question Booklet.  
  
3. On the right half of the ORS, using ONLY a black ink ball point pen, (i) darken the bubble 
corresponding to your test paper code and the appropriate bubble under each digit of your registration 
number and (ii) write your registration number, your name and name of the examination centre and 
put your signature at the specified location.  
  
4. This Question Booklet contains 20 pages including blank pages for rough work. After you are 
permitted to open the seal, please check all pages and report discrepancies, if any, to the invigilator. 
  
5. There are a total of 65 questions carrying 100 marks. All these questions are of objective type. Each 
question has only one correct answer. Questions must be answered on the left hand side of the ORS 
by darkening the appropriate bubble (marked A, B, C, D) using ONLY a black ink ball point pen 
against the question number. For each question darken the bubble of the correct answer. More 
than one answer bubbled against a question will be treated as an incorrect response. 
  
6. Since bubbles darkened by the black ink ball point pen cannot be erased, candidates should darken 
the bubbles in the ORS very carefully. 
  
7. Questions Q.1 – Q.25 carry 1 mark each. Questions Q.26 – Q.55 carry 2 marks each. The 2 marks 
questions include two pairs of common data questions and two pairs of linked answer questions. The 
answer to the second question of the linked answer questions depends on the answer to the first 
question of the pair. If the first question in the linked pair is wrongly answered or is unattempted, then 
the answer to the second question in the pair will not be evaluated. 
  
8. Questions Q.56 – Q.65 belong to General Aptitude (GA) section and carry a total of 15 marks. 
Questions Q.56 – Q.60 carry 1 mark each, and questions Q.61 – Q.65 carry 2 marks each.   
 
9. Unattempted questions will result in zero mark and wrong answers will result in NEGATIVE marks.  
For all 1 mark questions, ? mark will be deducted for each wrong answer. For all 2 marks questions, 
? mark will be deducted for each wrong answer.  However, in the case of the linked answer question 
pair, there will be negative marks only for wrong answer to the first question and no negative marks 
for wrong answer to the second question.  
  
10. Calculator is allowed whereas charts, graph sheets or tables are NOT allowed in the examination hall. 
  
11. Rough work can be done on the question paper itself. Blank pages are provided at the end of the 
question paper for rough work. 
  
12. Before the start of the examination, write your name and registration number in the space provided 
below using a black ink ball point pen. 
 
Name 
 
 
Registration Number 
CS 
       
 
A 
2012                                                                                                                                            COMPUTER SCIENCE & INFORMATION TECH. –  CS 
CS-A 2/20 
Q. 1 – Q. 25 carry one mark each. 
Q.1  Consider the following logical inferences. 
 
I
1
:  If it rains then the cricket match will not be played.  
     The cricket match was played. 
      Inference: There was no rain. 
I
2
:  If it rains then the cricket match will not be played.  
     It did not rain. 
     Inference: The cricket match was played. 
 
Which of the following is TRUE? 
(A) Both I
1
 and I
2
 are correct inferences 
(B) I
1 
is correct but I
2
 is not a correct inference 
(C) I
1
 is not correct but I
2
 is a correct inference 
(D) Both I
1
 and I
2
 are not correct inferences 
 
Q.2  Which of the following is TRUE? 
(A) Every relation in 3NF is also in BCNF 
(B) A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every     
 key of R 
(C) Every relation in BCNF is also in 3NF 
(D) No relation can be in both BCNF and 3NF 
 
Q.3  What will be the output of the following C program segment? 
 
char inChar = ‘A’ ; 
switch ( inChar ) { 
case ‘A’ : printf (“Choice A\ n”) ; 
case ‘B’ : 
case ‘C’ : printf (“Choice B”) ; 
case ‘D’ :  
case ‘E’ : 
default  : printf ( “ No Choice” ) ; } 
(A)   No Choice 
(B)   Choice A 
(C)   Choice A 
    Choice B No Choice 
(D)   Program gives no output as it is erroneous 
 
Q.4  Assuming P ? NP, which of the following is TRUE? 
(A) NP-complete = NP (B) NP-complete n P = ? 
(C) NP-hard = NP (D) P = NP-complete 
 
Q.5  The worst case running time to search for an element in a balanced binary search tree with n2
n
 
elements is 
(A) T (n log n) (B) T (n2
n
) (C)  T (n) (D) T (log n)  
 
2012                                                                                                                                            COMPUTER SCIENCE & INFORMATION TECH. –  CS 
CS-A 3/20 
Q.6  The truth table  
X Y f (X, Y) 
0 0 0 
0 1 0 
1 0 1 
1 1 1 
represents the Boolean function 
(A) X (B) X + Y 
(C)  X ? Y 
(D)  Y 
 
Q.7  The decimal value 0.5 in IEEE single precision floating point representation has 
(A) fraction bits of 000…000 and exponent value of 0 
(B) fraction bits of 000…000 and exponent value of -1 
(C) fraction bits of 100…000 and exponent value of 0 
(D) no exact representation 
 
Q.8  A process executes the code 
             fork(); 
             fork(); 
             fork(); 
The total number of child processes created is 
(A) 3 (B) 4 (C)  7 (D)  8 
 
Q.9  
Consider the function f(x) = sin(x) in the interval x ? [p/4, 7p/4]. The number and location(s) of the 
local minima of this function are 
(A) One, at p/2 
(B) One, at 3p/2 
(C) Two, at p/2 and 3p/2 
(D) Two, at p/4 and 3p/2 
 
Q.10  The protocol data unit (PDU) for the application layer in the Internet stack is 
(A) Segment (B) Datagram (C)  Message (D)  Frame 
 
Q.11  Let A be the 2 × 2 matrix with elements a
11
 = a
12 
= a
21 
= +1 and a
22 
= -1. Then the eigenvalues of 
the matrix A
19 
 are 
(A) 1024 and -1024 (B) 1024v2 and -1024v2 
(C) 4v2 and -4v2 (D) 512v2 and -512v2 
 
Q.12  What is the complement of the language accepted by the NFA shown below?  
Assume ? = {a} and ? is the empty string. 
 
 
(A) ? (B) { ?} (C)  a
*
 
(D)  {a , ?} 
 
? 
a 
? 
2012                                                                                                                                            COMPUTER SCIENCE & INFORMATION TECH. –  CS 
CS-A 4/20 
Q.13  What is the correct translation of the following statement into mathematical logic? 
“Some real numbers are rational” 
(A) ?x (real(x) ? rational(x)) 
(B) ?x (real(x) ? rational(x)) 
(C) ?x (real(x) ? rational(x)) 
(D) ?x (rational(x) ? real(x)) 
 
Q.14  Given the basic ER and relational models, which of the following is INCORRECT? 
(A) An attribute of an entity can have more than one value 
(B) An attribute of an entity can be composite 
(C) In a row of a relational table, an attribute can have more than one value 
(D) In a row of a relational table, an attribute can have exactly one value or a NULL value 
 
Q.15  Which of the following statements are TRUE about an SQL query? 
 
P : An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause 
Q : An SQL query can contain a HAVING clause only if it has a GROUP BY clause 
R : All attributes used in the GROUP BY clause must appear in the SELECT clause 
S : Not all attributes used in the GROUP BY clause need to appear in the SELECT clause 
(A) P and R (B) P and S (C)  Q and R  (D)  Q and S 
 
Q.16  The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with 
n discs is  
(A) T(n) = 2T(n - 2) + 2 (B) T(n) = 2T(n - 1) + n 
(C) T(n) = 2T(n/2) + 1 (D) T(n) = 2T(n - 1) + 1 
 
Q.17  Let G be a simple undirected planar graph on 10 vertices with 15 edges. If G is a connected graph, 
then the number of bounded faces in any embedding of G on the plane is equal to 
(A) 3 (B) 4 (C)  5 (D)  6 
 
Q.18  Let W(n) and A(n) denote respectively, the worst case and average case running time of an 
algorithm executed on an input of size n.  Which of the following is ALWAYS TRUE? 
(A) A(n) = O (W(n)) (B) A(n) = T (W(n)) 
(C) A(n) = O (W(n)) (D) A(n) = o (W(n)) 
 
Q.19  The amount of ROM needed to implement a 4 bit multiplier is 
(A) 64 bits (B) 128 bits (C)  1 Kbits (D)  2 Kbits 
 
Q.20  Register renaming is done in pipelined processors 
(A) as an alternative to register allocation at compile time 
(B) for efficient access to function parameters and local variables 
(C) to handle certain kinds of hazards 
(D) as part of address translation 
 
Q.21  Consider a random variable X that takes values +1 and -1 with probability 0.5 each. The values of 
the cumulative distribution function F(x) at x = -1 and +1 are 
(A) 0 and 0.5 (B) 0 and 1 (C)  0.5 and 1 (D)  0.25 and 0.75 
 
2012                                                                                                                                            COMPUTER SCIENCE & INFORMATION TECH. –  CS 
CS-A 5/20 
Q.22  Which of the following transport layer protocols is used to support electronic mail? 
(A) SMTP (B) IP (C) TCP  (D) UDP  
 
Q.23  In the IPv4 addressing format, the number of networks allowed under Class C addresses is 
(A) 2
14
 (B) 2
7
 (C)  2
21
 (D)  2
24
 
 
Q.24  Which of the following problems are decidable? 
 
1) Does a given program ever produce an output? 
2) If L is a context-free language, then, is L also context-free? 
3) If L is a regular language, then, is L also regular? 
4) If L is a recursive language, then, is L also recursive? 
(A)  1, 2, 3, 4 (B) 1, 2 (C)  2, 3, 4 (D)  3, 4 
 
Q.25  Given the language L = {ab, aa, baa}, which of the following strings are in L
*
? 
 
1) abaabaaabaa 
2) aaaabaaaa 
3) baaaaabaaaab 
4) baaaaabaa 
(A) 1, 2 and 3  (B) 2, 3 and 4 
(C) 1, 2 and 4 (D) 1, 3 and 4 
 
 
Read More
55 docs|215 tests

Top Courses for Computer Science Engineering (CSE)

FAQs on Gate (CS) 2012 Paper with Solution (Set A) - GATE Computer Science Engineering(CSE) 2025 Mock Test Series - Computer Science Engineering (CSE)

1. What is the Gate (CS) 2012 Paper with Solution?
Ans. The Gate (CS) 2012 Paper with Solution refers to the solved question paper of the Computer Science (CS) subject for the Graduate Aptitude Test in Engineering (GATE) exam that was conducted in 2012.
2. Where can I find the Gate (CS) 2012 Paper with Solution?
Ans. To find the Gate (CS) 2012 Paper with Solution, you can search for it on various online platforms such as educational websites, forums, or even on the official GATE website. Many coaching institutes and educational portals also provide these solved papers for reference.
3. Why is it important to refer to the Gate (CS) 2012 Paper with Solution?
Ans. Referring to the Gate (CS) 2012 Paper with Solution can be beneficial for GATE aspirants as it helps them understand the exam pattern, difficulty level, and types of questions asked in the actual exam. It also allows them to practice solving questions and evaluate their preparation level.
4. Are the solutions provided in the Gate (CS) 2012 Paper with Solution accurate?
Ans. The solutions provided in the Gate (CS) 2012 Paper with Solution are generally accurate and reliable. However, it is important to note that these solutions are prepared by experts or coaching institutes, and there may be slight variations in the answers based on different approaches or interpretations.
5. Can I solely rely on the Gate (CS) 2012 Paper with Solution for my GATE preparation?
Ans. While the Gate (CS) 2012 Paper with Solution is a valuable resource for GATE preparation, it is recommended not to solely rely on it. It is advisable to refer to multiple question papers from different years, study materials, textbooks, and other resources to have a comprehensive understanding of the subject and enhance your preparation for the GATE exam.
55 docs|215 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Exam

,

MCQs

,

mock tests for examination

,

Objective type Questions

,

Gate (CS) 2012 Paper with Solution (Set A) | GATE Computer Science Engineering(CSE) 2025 Mock Test Series - Computer Science Engineering (CSE)

,

Viva Questions

,

shortcuts and tricks

,

Gate (CS) 2012 Paper with Solution (Set A) | GATE Computer Science Engineering(CSE) 2025 Mock Test Series - Computer Science Engineering (CSE)

,

Semester Notes

,

Free

,

Sample Paper

,

video lectures

,

Summary

,

Gate (CS) 2012 Paper with Solution (Set A) | GATE Computer Science Engineering(CSE) 2025 Mock Test Series - Computer Science Engineering (CSE)

,

Extra Questions

,

study material

,

Previous Year Questions with Solutions

,

ppt

,

past year papers

,

practice quizzes

,

pdf

,

Important questions

;