Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment #1: Sorting with Binary Search Tree Through this programming assignment, the students will learn to do the following: 1. Know how to process command
Assignment #1: Sorting with Binary Search Tree Through this programming assignment, the students will learn to do the following: 1. Know how to process command line arguments. 2. Perform basic file VO. 3. Use structs, pointers, and strings. 4. Use dynamic memory. This assignment asks you to sort the lines of an input file (or from standard input) and print the sorted lines to an output file (or standard output). Your program, called bstsort (binary search tree sort), will take the following command line arguments: % bstsort l-cl 1-o output-file-name] [input-file-name] if -c is present, the program needs to compare the strings case sensitive; otherwise, its case insensitive. if the output file name is given with the -o option, the program will output the sorted lines to the given output file; otherwise, the output shall be the standard output. Similarly, if the input file name is given, the program wllread from the input file: otherwise, the input will be from the standard input. You must use getopt) to parse the command line arguments to determine the cases. All strings will be no more than 100 characters long. in addition to parsing and processing the command line arguments, your program needs to do the following
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started