Just a couple small c programs.

Lily Carpenter e9ca0f4a51 Added license notice to source files. il y a 12 ans
LICENSE 3df9101cc1 Create LICENSE il y a 8 ans
README.md caaf62798e I missed a word :( il y a 8 ans
myecho b83cb9674a Got a (pretty ugly looking) version of quicksort working. Checked for memory leaks, all good. Want to clean this up and probably make it an "in place" algorithm as well. il y a 8 ans
myecho.c e9ca0f4a51 Added license notice to source files. il y a 8 ans
mysort b67b9fda7e Better commenting, should be done now il y a 8 ans
mysort.c e9ca0f4a51 Added license notice to source files. il y a 8 ans

README.md

My Echo

Problem

Take a variable number of unsigned integers [in a binary stream] from STDIN and output them to STDOUT.

Solution

Uses fread to grab an array of numbers from the stream until the stream ends. During this, it uses a for loop to print every number from said array.

My Sort

Problem

Take a variable number of unsigned integers [in a binary stream] from STDIN and sort them using the quicksort algorithm, then output them to STDOUT.

Solution

Firstly, we pull arrays of numbers using fread until we have all of them, putting them in our grand numbers array while we go. After this, we call an in-place recursive version of quicksort to sort the numbers, then output them to STDOUT.