TRB - Computer Instructor - Computer Science - Data Structures

Buy Computer Instructors Grade I -Tamil Nadu Board Practice test pack

Question - 1

Consider the implementation of the stack using partially filled array. What goes wrong, if we try to store the top of the stack at location [0] and the bottom of the stack at the last position of the array?

  • A Both push and pop would require non-linear time
  • B Both push and pop would require linear time
  • C The stack could not be used to check balanced paranthesis
  • D The stack could not be used to evaluate postfix expression

Question - 2

Given
Preorder\(\rightarrow\) ABCEIFJDGHKL
Inorder\(\rightarrow\)EICFJBGDKHLA
Find the appropriate post-order traversal

  • A EIFJCKGLHDBA
  • B FCGKLHDBAEIJ
  • C IEJFGKLHDBA
  • D None of these 

Question - 3

A complete n-ray tree is one in which every node have 0 or n sons. If x is the number of internal nodes of a complete n-ray tree the number of the leaves in it is given by 

  • A x(n-1)
  • B n(x-1)
  • C xn+1
  • D x(n+1)

Question - 4

The best data structure to check whether an arithmetic expression has balanced parenthesis is a

  • A queue
  • B stack
  • C tree
  • D list

Question - 5

Stack can be represented by

  • A array
  • B linked list
  • C both a and b
  • D Neither a nor b

Question - 6

A postfix expression in merely the reverse of the prefix expression

  • A true
  • B false
  • C cannot say
  • D sometimes

Question - 7

In a stack, the data item placed on the stack first is

  • A the first data item to be removed
  • B the last data item to be removed
  • C given an index zero
  • D not given as index number

Question - 8

Faster access to non-local variables is achieved using an array of pointers to activation record called a

  • A heap
  • B activation tree
  • C display
  • D stack

Question - 9

If int s[s] is a one-dimensional array of integers, which of the following refers to the third element in the array?

  • A *(s+2)
  • B s+3
  • C *(s+3)+5
  • D *(s+3)+2

Question - 10

How many values can be held by an array defined as A(-1.....n,1-n)?

  • A n(n-1)
  • B n2(n+1)
  • C n(n+1)
  • D n(n+2)