Artifact 2: ANSI C Assignment 4
A command line based program that takes in records from stdin of first and last name, as well as a score, and inputs it in sorted order into a singly-linked list. Then, the program outputs the records to stdout, optionally outputting only certain records based on delimiters optionally set during program invoking.
Knowledge Applied
In this assignment, I utilize my knowledge of:
- ANSI C, including:
- standard C library function calls
- structs
- string manipulation
- manipulating singly linked lists
- apply practical design concepts
- problem solving
Skills Demonstrated
In this assignment, I demonstrate my ability to:
- plan ahead, and design before coding
- properly interpret given criteria and requirements
- utilize known C functions, and apply them in appropriate situations
I consider this assignment to be one of my best pieces of work because of the amount of careful planning, designing and testing that was needed to make this program work. The C language is not an easy language to learn, and this assignment validated that point, it was a very hard assignment. What made this artifact truly mine is how I did not write a single line of code before I had finished my rough program design, which I then transposed into a large comment at the top of the source code files.
A large amount of time in this project was spent analyzing each function, it's role and how it would manipulate data, and how I could possibly write that in C code. I found that at the time that I made this, I was starting to get much fewer compiler errors than when I had first started in C. One of my biggest issues with this assignment was that it was hard to separate my functions into sub-functions, as there are no private functions in C, and I did not want to create functions that were useless outside of its role for another function. Because of this, I had some functions that were much longer than I would've liked. This added to the program complexity, and lengthened the time it took to design, debug and test each function.
After finishing this assignment, I felt I knew a lot more about functions in the standard C libraries, as well as the importance of having test cases, and the importance of organization and planning.
The source code for this assignment can be downloaded here.