Code Snippets

Good Code Snippets, Examples

Free C Snippets/Examples

binary search, quicksort, crc32, binomialkoeffizient, and a lot more..

Various C Snippets (e.g. hexdump.c, strrepl.c (replace substrings), shell sort array of strings, mergesort linked list, …

Portable snippets

  • Comprehensive trig functions in radians, degrees, grads
  • Determine permutation index
  • Calculate PI to 8,000+ digits
  • Convert numeric string to 7-segment displays
  • Convert hex string to int
  • Doubly linked list functions
  • Hash table management
  • Scan command line for switches, filenames, response files (getopts)
  • Case-insensitive Boyer-Moore-Horspool search
  • Essential queue, stack, & FIFO functions
  • Add, subtract, and multiply BigNum's
  • Linked list quicksort
  • Replace substrings
  • Improved tokenizing function

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License