$29
Requirements
In this lab, you are required to write a function that reads integer inputs and add a node to a binary search tree. It should be able to perform in-order traversal of the tree and print it to the output.
The input file purely contains integer range values in each line.
• cat input.txt
1
2
3
4
5
6
8
9
7
• ./a.out input.txt output.txt (<- this runs the program)
• cat output.txt
1
2
3
4
5
6
7
8
9
Below are the specifications of the lab.
1. The run command will be
./<name of executable> <input file> <output file>
2. There will not be any duplicates.
3. Input values are not sorted.
4. There are no corner cases in this lab.
Grading
Make sure to test against those to ensure that your program output format works. Any grading failure due to not following specifications will result in 0. For full marks this week, you must:
• (1 point) Correctly submit A number file
• (1 point) Not having any files in github other than lab8.c and AXXXX.txt
• (3 point) Generate a correct solution (including correct memory allocation and deallocation) to the problem(s) in this lab
Submission Files
• You must deliver only one .c file named: lab8.c (do not capitalize)
• AXXXX.txt (empty file, but with your A number as file name. Make sure to include 0’s, match this A number with your A number in learning hub, and have .txt extension)
• Github: https://classroom.github.com/a/7XbMtSOT