write a code using vi.
I will upload to screenshots with the instructions for the assaignment.
Design and implement a language program based on the following specifications:
1. The user interface will prompt for ten unique character strings to be entered from the keyboard. Each character string must have a
strlen() value between 1 and 25, otherwise an error message is provided and the user is re-prompted. The program sorts this series
of ten character strings (based on ascii value), and reprints all ten strings in ascending OR descending order based on user
specification. The program then prints and labels the character string with the lowest ascii value and that with the highest ascii value
as determined by strcmp(). Character strings may NOT include the following characters: ‘!’,’@’,’#’, ‘$’, ‘%’,’N’,’1′ or ‘). 5 Points
2. Include additional error checking for: Empty string, Duplicate string, Character other than ‘A’ or ‘D’ for sort specification. 2 Points
3. Include at least 2 user defined functions. 2 points
4. The program must be well commented. 1 point
5. Submit a single .c file entitled HW1-Gnum-lastname.c. This file must be readable using the vi text editor, and must compile using gcc.
6. Your full name and Gnumber must be included within the comment section at the top of the page.
7. Submitted via Blackboard no later than 11:59 PM 2/25.
Example interface and output:
Hals-iMac: halgreenwald$ ./hw1
Enter 10 character strings:
…cont
Print character strings in Ascending or Descending order: A
Ascending order:
Enter string 1: Test string 1
Enter string 2: Test string 1
Enter string 3: hello world
Enter string 4: CS 531
Enter string 5: George Mason University
Enter string 6: abcedfghijk
Enter string 7: George Mason University
Error: duplicate string – please re-enter
Enter string 7: kji
Enter string 8: Test string 2
Enter string 9: test string @
Error: @ Is an illegal character – please re-enter
Enter string 9: test string 1
Enter string 10: test String 1
CS 531
George Mason University
Test string 1
Test string 1
Test string 2
abcedfghijk
hello world
kji
test String 1
test string 1
String with lowest ascii value: CS 531
String with highest ascii value: test string 1
General guidelines for homework grading:
If your program cannot be built (compiled) using goc, no points will be given.
If your source code cannot be easily read using vi, no points will be given.
If compilation results in “warning” messages, these messages must be justified (explained)
within your program documentation.
If your program terminates abnormally, even once, we will take off 20%.
If your program does not fit the homework description, we will take off points anywhere
between 1% to 100%.
Late submissions lose 10% per day.
Honor Code
Cheating and Plagiarism are absolutely forbidden, and easily determined. I assume that you have read
GMU Honor Code.