Compiler Homework 2 (Due Tuesday 21 June 2548)

  1. Write a data definition for a ternary tree.
  2. Write C code for the above data definition
  3. Write at least 5 data examples for the above data definition
  4. Write a function (nNode) to count number of nodes in a ternary tree
  5. Write a function (showInorder) to show the content of a ternary tree in an inorder fashion.