Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions