Code Snippets

Good Code Snippets, Examples

Free C Snippets/Examples
http://www.daniweb.com/code/c-timestamp-8.html

binary search, quicksort, crc32, binomialkoeffizient, and a lot more..
http://www.itcsoftware.com/code/sourcecode.htm

Various C Snippets (e.g. hexdump.c, strrepl.c (replace substrings), shell sort array of strings, mergesort linked list, …
http://www.cs.umu.se/~isak/snippets/

Portable snippets
Examples:

  • 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

http://c.snippets.org/browser.php

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