# GATE CSE 2003

 Question 1
Consider the following C function.

float f(float x, int y)
{
float p, s; int i;
for (s=1, p=1, i=1; i < y; i ++)
{
p*= x/i;
s+=p;
}
return s;
}  
For large values of y, the return value of the function f best approximates
 A $x^{y}$ B $e^{x}$ C ln(1+x) D $x^{x}$
C Programming   Loop
Question 1 Explanation:
 Question 2
Assume the following C variable declaration
int *A [10], B[10][10];
Of the following expressions
I A[2]
II A[2][3]
III B[1]
IV B[2][3]
which will not give compile-time errors if used as left hand sides of assignment statements in a C program?
 A I, II, and IV only B II, III, and IV only C II and IV only D IV only
C Programming   Array and Pointer
Question 2 Explanation:
 Question 3
Let P(E) denote the probability of the event E. Given P(A) = 1, P(B) = 1/2, the values of P(A|B) and P(B|A) respectively are
 A 1/4,1/2 B 1/2, 1/14 C 1/2, 1 D 1, 1/2
Discrete Mathematics   Probability Theory
Question 3 Explanation:
 Question 4
Let A be a sequence of 8 distinct integers sorted in ascending order. How many distinct pairs of sequences, B and C are there such that
(i) each is sorted in ascending order,
(ii) B has 5 and C has 3 elements, and
(iii) the result of merging B and C gives A?
 A 2 B 30 C 56 D 256
Discrete Mathematics   Combination
Question 4 Explanation:
 Question 5
n couples are invited to a party with the condition that every husband should be accompanied by his wife. However, a wife need not be accompanied by her husband. The number of different gatherings possible at the party is
 A $\binom{2n}{n}*2^{n}$ B $3^{n}$ C $\frac{(2n)!}{2^{n}}$ D $\binom{2n}{n}$
Discrete Mathematics   Combination
Question 5 Explanation:
 Question 6
Let T(n) be the number of different binary search trees on n distinct elements.
Then $T(n)=\sum_{k=1}^{n}T(k-1)T(x)$,
where $x$ is
 A n-k+1 B n-k C n-k-1 D n-k-2
Data Structure   Binary Search Tree
Question 6 Explanation:
 Question 7
Consider the set $\Sigma ^{*}$ of all strings over the alphabet $\Sigma$={0,1}. $\Sigma ^{*}$ with the concatenation operator for strings
 A does not form a group B forms a non-commutative group C does not have a right identity element D forms a group if the empty string is removed from $\Sigma ^{*}$
Discrete Mathematics   Group Theory
Question 7 Explanation:
 Question 8
Let G be an arbitrary graph with n nodes and k components. If a vertex is removed from G, the number of components in the resultant graph must necessarily lie between.
 A k and n B k-1 and k+1 C k-1 and n-1 D k+1 and n-k
Discrete Mathematics   Graph Theory
Question 8 Explanation:
 Question 9
Assuming all numbers are in 2's complement representation, which of the following number is divisible by 11111011?
 A 11100111 B 11100100 C 11010111 D 11011011
Digital Logic   Number System
Question 9 Explanation:
 Question 10
For a pipelined CPU with a single ALU, consider the following situations
1. The (j + 1)-th instruction uses the result of j-th instruction as an operand
2. The execution of a conditional jump instruction
3. The j - th and j + 1 - st instructions require the ALU at the same time
Which of the above can cause a hazard?
 A 1 and 2 only B 2 and 3 only C 3 only D All the three
Computer Organization   Pipeline Processor
Question 10 Explanation:
There are 10 questions to complete.