Hello guys! please make sure program runs well
USING C anything else
If you are not sure about it please dont send it out
Through this programming assignment, the students will learn to do the following: 1. Practice
processing command line arguments. 2. Perform basic file I/O. 3. Use structs, pointers, and
strings. 4. Use dynamic memory. This assignment asks you to create a doubly linked list which will
be used to sort the words in an input file and print the sorted words to an output file (or standard
output) which will be the solution. Your program, called doublesort, will take the following
command line arguments: % doublesort [d] [-o output_file_name] input_file_name Read the words
in from the input file one at a time. Convert all the letters to lower case. Skip any punctuation or
special characters. If the output_file_name is given with the -o option, the program will output the
sorted letters to the given output file; otherwise, the output shall be to standard output. In addition
to parsing and processing the command line arguments, your program needs to do the following:
1. You need to construct a doubly linked list as you read from input. Each node in the list will link
to the one in front of it and the one behind it if they exist. They will have NULL for the previous
pointer if they are first in the list. They will have NULL for the next pointer if they are last in the list.
You can look up doubly linked lists in your Data Structure textbook. 2. Initially the list is empty. The
program reads from the input file one word at a time and converts it to lower case. Create a node
with a pointer to the word and 2 pointers to nodes, previous and next. Initially the previous and
next pointers should be NULL. 3. As long as you continue reading words, if the word is not already
in the list, create a new node and place the node into the list in the proper alphabetical order. If
there is a node in front of it, adjust the next pointer of that node to point to the new node and make
the previous pointer of the new node to point to the node in front of it. If there is a node after it then
adjust those pointers as well so the list remains continuous. All duplicate words are ignored. 4. An
end of file would indicate the end of input from the input file. 5. Once the program has read all the
input, the program then performs a traversal of the doubly linked list first to last, or last to first if the
- d option is set, to print one word at a time to the output file or stdout. Print one word per3. As
long as you continue reading words, if the word is not already in the list, create a new node and
place the node into the list in the proper alphabetical order. If there is a node in front of it, adjust
the next pointer of that node to point to the new node and make the previous pointer of the new
node to point to the node in front of it. If there is a node after it then adjust those pointers as well
so the list remains continuous. All duplicate words are igno.
Hello guys please make sure program runs well USING C anyth.pdf
1. Hello guys! please make sure program runs well
USING C anything else
If you are not sure about it please dont send it out
Through this programming assignment, the students will learn to do the following: 1. Practice
processing command line arguments. 2. Perform basic file I/O. 3. Use structs, pointers, and
strings. 4. Use dynamic memory. This assignment asks you to create a doubly linked list which will
be used to sort the words in an input file and print the sorted words to an output file (or standard
output) which will be the solution. Your program, called doublesort, will take the following
command line arguments: % doublesort [d] [-o output_file_name] input_file_name Read the words
in from the input file one at a time. Convert all the letters to lower case. Skip any punctuation or
special characters. If the output_file_name is given with the -o option, the program will output the
sorted letters to the given output file; otherwise, the output shall be to standard output. In addition
to parsing and processing the command line arguments, your program needs to do the following:
1. You need to construct a doubly linked list as you read from input. Each node in the list will link
to the one in front of it and the one behind it if they exist. They will have NULL for the previous
pointer if they are first in the list. They will have NULL for the next pointer if they are last in the list.
You can look up doubly linked lists in your Data Structure textbook. 2. Initially the list is empty. The
program reads from the input file one word at a time and converts it to lower case. Create a node
with a pointer to the word and 2 pointers to nodes, previous and next. Initially the previous and
next pointers should be NULL. 3. As long as you continue reading words, if the word is not already
in the list, create a new node and place the node into the list in the proper alphabetical order. If
there is a node in front of it, adjust the next pointer of that node to point to the new node and make
the previous pointer of the new node to point to the node in front of it. If there is a node after it then
adjust those pointers as well so the list remains continuous. All duplicate words are ignored. 4. An
end of file would indicate the end of input from the input file. 5. Once the program has read all the
input, the program then performs a traversal of the doubly linked list first to last, or last to first if the
- d option is set, to print one word at a time to the output file or stdout. Print one word per3. As
long as you continue reading words, if the word is not already in the list, create a new node and
place the node into the list in the proper alphabetical order. If there is a node in front of it, adjust
the next pointer of that node to point to the new node and make the previous pointer of the new
node to point to the node in front of it. If there is a node after it then adjust those pointers as well
so the list remains continuous. All duplicate words are ignored. 4. An end of file would indicate the
end of input from the input file. 5. Once the program has read all the input, the program then
performs a traversal of the doubly linked list first to last, or last to first if the -d option is set, to print
one word at a time to the output file or stdout. Print one word per line. 6. Before the program ends,
it must reclaim the list! You can do this by going through the list and freeing all nodes. This can be
done in either direction. 7. It is required that you use getopt for processing the command line and
use malloc or calloc and free functions for dynamically allocating and deallocating nodes. Note
that there should be NO SORT function used. As the doubly linked list is created it is done in
proper order. Please submit your work as one zip file. Follow the instructions below carefully (to
avoid unnecessary loss of grade): You should submit the source code and the Makefile in the zip
file called FirstnameLastnameA3. One should be able to create the executable by simply 'make'.
2. The Makefile should also contain a 'clean' target for cleaning up the directory (removing all object
files at a minimum). Make sure you don't include intermediate files: .0, executables, , etc., in your
submission. (There'll be a penalty for including unnecessary intermediate files). Only two files
should be included unless permission is given for more, those would be doublesort.c, and
Makefile. If you feel a need to include a .h file written by you, please send me a note with a copy of
the file asking for permission. Late submissions will have a deduction as per the syllabus. - If the
program does not compile and do something useful when it runs it will not earn any credit. - If a
program is plagiarized, it will not earn any credit. - If a program uses a user written .h file without
permission it will not earn any credit.