Tskafli8

13 Questions | Attempts: 388
Share

SettingsSettingsSettings
Tskafli8 - Quiz

Spurningar úr kaflanum: (kafli 8)


Questions and Answers
  • 1. 

    Suppose a binary tree contained the nodes W,X,Y and Z. If W and X were children of Y and Z had no children, which node would be the root?

    • A.

      Y

    • B.

      X

    • C.

      Z

    • D.

      W

    Correct Answer
    A. Y
  • 2. 

    Suppose you were going to retrieve items of data that you would later need to process in the opposite order from that in which they were retrived. Which of the following would be the best structure in which to store the items?

    • A.

      Traditional linked list

    • B.

      Stack

    • C.

      Tree

    • D.

      Queue

    Correct Answer
    B. Stack
  • 3. 

    If the two-dimensional array X were stored in row-major order, then in the block of main mermory containing X, which of the following would be true?

    • A.

      The entry X[1,2] would be in the same location as X[2,1]

    • B.

      The entry X[1,2] would be appear before X[2,1]

    • C.

      The entry X[1,2] would appear after X[2,1]

    • D.

      None of the above

    Correct Answer
    B. The entry X[1,2] would be appear before X[2,1]
  • 4. 

    If the longest path in a binary tree contained exactly four nodes, what is the maximum number of nodes that could be in that entier tree?

    • A.

      31

    • B.

      7

    • C.

      15

    • D.

      4

    Correct Answer
    C. 15
  • 5. 

    In a machine language, the technique in which the data to be manipulated by an instruction is included within the instruction itself is called…

    • A.

      Direct adressing

    • B.

      Indirect adressing

    • C.

      Immediate addressing

    Correct Answer
    C. Immediate addressing
  • 6. 

    Which of the following is a LIFO structure?

    • A.

      Stack

    • B.

      Queue

    • C.

      Tree

    • D.

      Array

    Correct Answer
    A. Stack
  • 7. 

    If the number of nodes in a binary tree is 2^n (where n is a positive integer), then the entire tree would contain at least

    • A.

      2^n+1 -1 nodes

    • B.

      2^n+1 nodes

    • C.

      2^n+2 nodes

    • D.

      2^2n nodes

    Correct Answer
    A. 2^n+1 -1 nodes
  • 8. 

    The nodes in which of the trees below will be printed in alphabetical order by the following recursive procedure? procedure printTree (Tree)          if(Tree is not empty)              then (apply the procedure printTree to the left subtree of Tree;                      apply the procedure printTree to the right subtree of Tree;                      print the root node) Veldu eitt:

    • A.

      A)

    • B.

      B)

    • C.

      C)

    Correct Answer
    B. B)
  • 9. 

    Which of the following is a FIFO Structure?

    • A.

      Array

    • B.

      Queue

    • C.

      Stack

    • D.

      Tree

    Correct Answer
    B. Queue
  • 10. 

    If a stack contained the entries w,x, y, z (from top to bottom), which of the following would be the contents after two enteries were removed and the the entry r was inserted?

    • A.

      R, y, z

    • B.

      R, w, x

    • C.

      W, x, r

    • D.

      Y, z, r

    Correct Answer
    A. R, y, z
  • 11. 

    • A.

      A.

    • B.

      B.

    • C.

      C.

    • D.

      None of the above

    Correct Answer
    B. B.
  • 12. 

    Which of the following is not used when determining the location of an entry in a two-dimentional homogeneous array stored in row-major orderd?

    • A.

      Number of rows in the array

    • B.

      Number of columns in the array

    • C.

      Indices

    • D.

      Address polynomial

    Correct Answer
    A. Number of rows in the array

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Oct 28, 2013
    Quiz Edited by
    ProProfs Editorial Team
  • Nov 28, 2012
    Quiz Created by
    Viddz1
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.