Time Left - 10:00 mins

ISRO 2018:Programming & DS Booster Quiz- 3

Attempt now to get your rank among 871 students!

Question 1

A one dimensional Arrays A has indices 1.... 75. Each element is a string and takes up three memory words. The Arrays is stored at location 1120 decimal. The starting address of A [49] is

Question 2

The time required to search an element in a linked list of length n is

Question 3

Worst case time complexity for finding depth of a binary search tree is

Question 4

Suppose the numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially empty binary search tree. The binary search tree uses the usual ordering on natural numbers. What is the in order traversal sequence of the resultant tree?

Question 5

What does the following program do when the input is unsigned 16-bit integer?
#include<stdio.h>
int main()
{
      unsigned int num;
      int i;
      scanf (“%u”, &num);
      for (i = 0; i<16; i++)
      {
          printf (“%d”, (num << i & 1 << 15) ? 1:0);
       }
}

Question 6

What is the output of this C++ program?
#include <iostream>
using namespace std;
void square (int *x);
{
*x = (*x)++*(*x);
}
void square (int *x, int *y)
{
*x = (*x)*--(*y);
}
int main ()
{
int number = 30;
square(&number, &number);
cout << number;
return 0;
}

Question 7

Which of the following data structure is useful in traversing a given graph by breadth first search?

Question 8

Assume that the operators +, -, x are left associative and ^ is right associative. The order of precedence (from highest to lowest) is ^, x,+, -.The postfix expression corresponding to the infix expression a + b x c — d ^e^f is
  • 871 attempts
  • 7 upvotes
  • 20 comments
Jun 4GATE & PSU CS