Complete GATE CSE 2020 Paper 1 overview, original pages and practice · Timed previous-paper practice

Questions 55–57 of 65. Imported answers require review unless explicitly marked reviewed.

Paper practice 65 questionsPage 19 of 22

Question 45

Open question
CSNAT2 marksNeeds review
For

, let

be a non-zero vector. Suppose that

is chosen uniformly at random from

. Then, the probability that

is an odd number is ______.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 46

Open question
CSNAT2 marksNeeds review
Consider the following C functions.
int fun1(int n) {
static int i = 0;
if (n > 0) {
++i;
fun1(n-1);
}
return (i);
}

int fun2(int n) {
static int i = 0;
if (n > 0) {
i = i + fun1(n);
fun2(n-1);
}
return (i);
}
The return value of fun2(5) is ______.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 47

Open question
CSNAT2 marksNeeds review
Consider the array representation of a binary min-heap containing 1023 elements. The minimum number of comparisons required to find the maximum in the heap is ______.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer