A repository with a few examples of system calls using C and the UNIX standard libraries
There are two main directories:
elementary_sys_calls: a collection of examples involving opening and closing files to read and write in them. Note that these examples are not particularly comprehensive, showing only some basic functionality. Refer to the README file included under this directory for further information.forks: two examples using forks.forks.cis a simple coin-flipping scenario, with a brief explanation of random number generation (RNG) in C and a few samples of bitwise operations in C.forks2.ccomputes the sum of a set number of factorials, with the intent of displaying how to retrieve and use exit status values generated by child processes.
All examples are created for demonstrative purposes only, and forego best coding practices in the interest of clear presentation. They are, then, not guaranteed to be optimal. Expanding them to parse and interact with console inputs could be an interesting exercise for learners to deepen their understanding of C.