TEXT   13
void infix tree t void process
Guest on 11th July 2024 08:32:07 AM


  1. #include <stdio.h>
  2. #include "Tree.h"
  3.  
  4. void infix(Tree T, void process(TreeElementType))
  5. /* NB. process is a procedure formal parameter. */
  6.  { if( T != NULL )
  7.     { infix( T->left, process );
  8.       process(T->elt);
  9.       infix( T->right, process );
  10.     }
  11.  }/*infix*/
  12.  
  13. /* Infix Tree Traversal. */

Raw Paste

Login or Register to edit or fork this paste. It's free.