This repo contains code relevant to embedded software engineers preparing for interviews.
Table of Contents:
Basics:
- Endianness of machine - endian.c
- Two's complement representation of numbers - twos_complement.c
- Swap Bytes - swapbytes.c
- Aligned Malloc and Free - aligned_malloc.c
Device Driver:
- CAN driver register programming using bitfields - can_bitfields.c
- CAN driver register programming using macros - can_offsets.c
- Update Bits/Field in a register - update_bits.c
Pointers:
- Arrays of Pointers - array_of_pointers.c
- Pointer to Arrays - pointer_to_arrays.c
- Function Pointer Arrays - function_pointers.c
Simple Algorithms:
- Fibonacci sequence - fibonacci_recursive.c
- Binary search in an array - binsearch_array.c
- Reverse linked list - reverse_list.c
Multi-threading & Multi-processing: (Compile-line: Use -pthread and -lrt)
- Pthreads & Mutexes - threads.c
- Fork & Posix Semaphores - process.c
TBD:
- Processing command line args
- Variable length data at the end of a struct
- Circular linked list, with double pointers
- Binary search tree