# Computer Science and Information Technology - GATE 2012 Paper Solution

Consider the following logical inferences.

I1: If it rains then the cricket match will not be played.
The cricket match was played.
Inference: There was no rain.
I2: 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?

##### Show Answer

Which of the following is TRUE?

##### Show Answer

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” ) ; }

##### Show Answer

Assuming P ≠ NP, which of the following is TRUE?

##### Show Answer

The worst case running time to search for an element in a balanced binary search tree with n2n elements is

##### Show Answer

The truth table

 X Y f (X, Y) 0 0 0 0 1 0 1 0 1 1 1 1

represents the Boolean function

##### Show Answer

The decimal value 0.5 in IEEE single precision floating point representation has

##### Show Answer

A process executes the code

fork();
fork();
fork();

The total number of child processes created is

##### Show Answer

Consider the function f(x) = sin(x) in the interval x $\in$$\left[\mathrm{\pi }/4,7\mathrm{\pi }/4\right]$. The number and location(s) of the local minima of this function are

##### Show Answer

The protocol data unit (PDU) for the application layer in the Internet stack is

##### Show Answer

Let A be the 2 × 2 matrix with elements a11 = a12 = a21 = +1 and a22 = −1. Then the eigenvalues of the matrix A19 are

##### Show Answer

What is the complement of the language accepted by the NFA shown below? Assume $\Sigma$ = {a} and $\epsilon$ is the empty string.

##### Show Answer

What is the correct translation of the following statement into mathematical logic?

“Some real numbers are rational”

##### Show Answer

Given the basic ER and relational models, which of the following is INCORRECT?

##### Show Answer

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

##### Show Answer

The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with n discs is

##### Show Answer

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

##### Show Answer

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?

##### Show Answer

The amount of ROM needed to implement a 4 bit multiplier is

##### Show Answer

Register renaming is done in pipelined processors