GATE CS 2015 Set 1 — Question 35
Consider the following function written in C:int f(int n) { static int i = 1; if (n >= 5) return n; n = n + i; i++; return…
GATE exam stream
174 questions and papers
Consider the following function written in C:int f(int n) { static int i = 1; if (n >= 5) return n; n = n + i; i++; return…
Consider the following function:int f(int n) { static int r = 0; if (n <= 0) return 1; if (n > 3) { r = n; return f(n…
The following C function takes a singly linked list as an input argument. It modifies the list by moving the last element to the front of the list…
The following postfix expression with single-digit operands is evaluated using a stack:8 2 3 ^ / 2 3 * + 5 1 * -Note that ^ is the…
The maximum number of binary trees that can be formed with three unlabelled nodes is:
Postorder traversal of a given binary search tree T produces the following sequence of keys:10, 9, 23, 22, 27, 25, 15, 50, 95, 60, 40, 29Which one of…
The following C function takes a singly linked list of integers as a parameter and rearranges the elements of the list. The list is created with the integers…
Suppose \(Y\) is distributed uniformly in the open interval \((1,6)\). The probability that the polynomial \(3x^{2}+6xY+3Y+6\) has only real roots is (rounded off to 1 decimal place) ______.
\(P\) and \(Q\) are considering to apply for a job. The probability that \(P\) applies for the job is \(\dfrac{1}{4}\), the probability that \(P\) applies for the job given that \(Q\) applies for the job is \(\dfrac{1}{2}\), and the probability that \(Q\) applies for the…
Suppose that a shop has an equal number of LED bulbs of two different types. The probability of an LED bulb lasting more than 100 hours given that…
Every question here is free to read. A free account adds the verified key, the worked solution and your progress.