Self Studies

Programming and...

TIME LEFT -
  • Question 1
    2 / -0.33

    What is the number of  binary search trees possible with 9 distinct keys?

  • Question 2
    2 / -0.33

    A program X reads in 300 integers in the range [0..100] representing the %attendance of 300 students. It then prints the frequency of each %attendance above 25. What would be the best way for X to store the frequencies?

  • Question 3
    2 / -0.33

    If a queue is implemented using two stacks. In enqueue operation, all the elements are pushed from the first stack to the second stack. In dequeue operation pop an element from 1st stack.

    Which of the following is/are true?

  • Question 4
    2 / -0.33

    A function f defined on stack of integer satisfies the following properties f(empty) = 0 and f (push (S, i)) = max (f(s), 0) + i for all stacks S and integer i.

    After pushing integers 2, -3, 2, -1, 2 in order from bottom to top. f(s) returns the top of the stack. What is f(s)?

  • Question 5
    2 / -0.33

    What is the return output of the following C program segment?

    char c= '2';

     switch(c)

    {

    case '1': printf("C program, ");           

    case '2':

    case '3': printf("Java program, ");

    case '4' :

    case '5': break;

    default: printf("No program");

    }

    return 0;

    }

  • Question 6
    2 / -0.33

    Which of the following is/are true with respect to stacks and queues where where front points to the index where deletion is done and the rear points to the index where insertion is done in queue?

  • Question 7
    2 / -0.33

    Consider the following C program

    main ( )

    {

    int N, x;

    scanf (“% d”, &N);

    x = 0;

    while (N > 0)

    {

    x = x + 1 – N % 2;

    N / = 2;

    }

    printf(“% d”, x)

    }

    What is the sum of the smallest three values of N for which the value printed is 5?

  • Question 8
    2 / -0.33

    The following postfix expression with single digit operands in evaluated using a stack

    4 2 5 ^ * 14 7 / - 7 5 * +

    Note that ^ is exponentiation operator, * is multiplication operator, / is division operator, + is addition operator and – is subtraction operator

Submit Test
Self Studies
User
Question Analysis
  • Answered - 0

  • Unanswered - 8

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
Submit Test
Self Studies Get latest Exam Updates
& Study Material Alerts!
No, Thanks
Self Studies
Click on Allow to receive notifications
Allow Notification
Self Studies
Self Studies Self Studies
To enable notifications follow this 2 steps:
  • First Click on Secure Icon Self Studies
  • Second click on the toggle icon
Allow Notification
Get latest Exam Updates & FREE Study Material Alerts!
Self Studies ×
Open Now