C and C++ Source Code Snippets

Welcome to Cprogramming.com's programming code snippet repository. Peruse the archives or add your own snippets for others to use! (Check the following link a better definition of a snippet)

Sort by clicking on any of the headers.

SnippetAuthorLanguagePlatformRating (votes)
how to implement strlwr in CSyed Rafey Husain C or C++ANSI3.4 (44)
Convert an integer into binary representationElabed Soufiane CANSI3.3 (44)
This C code assigns codes to a maximum of 10 charsAbhishek H.Dwivedi C or C++Windows3.1 (35)
Merge sort of an integer listBibhubrata Narendra C or C++ANSI2.9 (38)
Find the minimum distance between two linesGiacomo C or C++ANSI2.9 (36)
Creating, printing and free linked listsSyed Rafey Husain CANSI2.9 (36)
Print variables with file and line number for debuggingmike lear C++ANSI2.6 (37)
Calculates 1 variable statisticsPaul Kennedy C++ANSI2.5 (35)
Dynamically Allocating a Multidimensional ArrayJared Hendrickson CANSI2.4 (36)
Simple integer binary search example source codeSyed Rafey Husain C or C++ANSI2.3 (33)
Previous 30

Add a snippet!