Computer Science and Information Technology
2020 · Paper 1
Take it one question at a time. Try an answer, then check your understanding.
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.
Question 45
Open questionCSNAT2 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 answerQuestion 46
Open questionCSNAT2 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 answerQuestion 47
Open questionCSNAT2 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