Just some code to track some basics of the C language for personal reference.
Topics include
- Header Files
- Global Variables
- Static Variables
- "sizeof" variables, pointers and structures
- Dynamic Memory - Malloc() and Free()
- Pointers
- returned from functions
- dereferencing
- generic pointers (void *ptr)
- passing data into/out of functions
- passing functions with pointers (functional programming)
- passing arrays into functions - this is done using pointers
- Arrays
- passed to functions
To Do:
Figure out the size of functions (stack size) - this is done through linker/compiler options- Pointers: passing stings and arrays to functions
- type casting
- pointers: addr= (structure_name *)function(function_input);
Compiled using GCC on Windows 10
"gcc Header_Functions.c Header_Test.c Pointer_Functions.c -o header_out"
Run by executing
"header_out"