Question: I need help for this C project ASAP Project Description Write a C (not C++ ) console application (in Visual Studio) that determines whether a

I need help for this C project ASAP  I need help for this C project ASAP Project Description Writea C (not C++ ) console application (in Visual Studio) that determines

Project Description Write a C (not C++ ) console application (in Visual Studio) that determines whether a data stream is sorted in ascending order. A data stream can be either keyboard or a file. The interface for the program is a command shell's command line. Requirements Your program must handle any length of list (potentially billions!) so your program must work in a 64-bit build. The list will be input (or piped) from the console or read from a file. This is terminated with end-of-stream (^ Z on windows). The output must indicate if the data is sorted by printing the single word 'sorted' on a single line, then return the integer value 101 from main. If the stream is not sorted, you are to print "element \# (value) not sorted" where \# is the offset of the first out-of-order element and value is the value of the unsorted element. In the unsorted case, main must return the integer 100 . Failure to complete the test (bad input, filename, switch) for any reason and the main should return EXIT_FAILURE. If 'help' was selected, main should return EXIT_SUCCESS. The command line arguments Notes 1. You are only expected you perform input with getchar() and scanf(). 2. You are not required to validate that every number is actually the correct type (i.e., you don't have to test for the negative sign if reading natural numbers. 3. You should report if the user entered an invalid switch (e.g., -x)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!