Time Left - 12:00 mins
ISRO CS 2019 : DS Booster Quiz 3
Attempt now to get your rank among 549 students!
Question 1
Consider the C function given below
int f(int j)
{
static int i = 50;
int k;
if (i == j)
{
printf(“something”);
k = f(i);
return 0;
}
else return 0;
}
Which one of the following is TRUE?
int f(int j)
{
static int i = 50;
int k;
if (i == j)
{
printf(“something”);
k = f(i);
return 0;
}
else return 0;
}
Which one of the following is TRUE?
Question 2
Consider a max heap represented by the array elements:
{50, 25, 22, 17, 16, 15, 12, 10, 9}. The following operations are carried out: 17 is deleted, 24 is inserted. The number of operations to heapify is
Question 3
Consider the following code segment
void foo(int x, int y)
{
x+=y;
y+=x;
}
main()
{
int x=5.5;
foo(x,x);
}
What is the final value of x in both call by value and call by reference, respectively?
Question 4
The result evaluating the prefix expression + + ^ 4 2 - 10 4 5 is
Question 5
Find the average number of key comparisons required for an unsuccessful search of a random binary search tree with 14 nodes and 50 as external path length.
Question 6
How many distinct binary operations can be defined on a set of 2 elements?
Question 7
main()
{
printf(“%d%d%d%d%d”, ‘ \n ‘ ,printf(“\0”),printf(“\n”),’ \0 ‘ , ‘ \b ‘ );
}
What will be printed by this above code?
{
printf(“%d%d%d%d%d”, ‘ \n ‘ ,printf(“\0”),printf(“\n”),’ \0 ‘ , ‘ \b ‘ );
}
What will be printed by this above code?
Question 8
How many minimum number of nodes can present in the complete binary tree at depth d?
Question 9
Match the most closely related terms–
Question 10
Consider the polynomial p(x) = a0+ a1x + a2x2 + a3x3, where ai0, i. The minimum number of multiplications needed to evaluate p on an input x is
- 549 attempts
- 1 upvote
- 2 comments
Mar 26GATE & PSU CS