// File: main.cpp
#include <iostream>
#include <fstream>
#include <iomanip>
using namespace std;
int recursiveCount = 0;
int visitCount = 0;
typedef void ( * Function )(const int value);
void preorder(const int list[], const int n, const int index,Function visit);
void print(const int value);
int leftIndex(const int index);
int rightIndex( const int index);
int main() {
int list[] = {1,2,3,4,5,6,7,8,9,10};
/* TODO (1):
* Call the preorder function.
*/
preorder(list, 0, 10);
cout << endl;
return 0;
}// end main()
void preorder(const int list[], const int n, const int index,Function visit) {
/* START – NO EDIT */ recursiveCount += 1; /* END – NO EDIT */
/* TODO (1):
* Perfrom a recursive preorder traversal of the complete binarytree.
* Print the element visited followed