C Code Snippets

C source code example for using struct tm, time_t, and time to create a simple clock

17 July, 2018   

This function takes a string and an output buffer and a desired width.

Procedural Programming technique shows creation of Pascal's Triangl

08 February, 2017   

Code example to create a new file under linux

14 August, 2016   

All of the XOR encryption algorithms

C code snippet for merging sort algorithm to sort

13 January, 2016   

Example code to implement strlwr in C

Source code to convert an integer into binary representation

C code snippet to dynamically create and initialize 4d array

The array is formed dynamically using malloc.

13 September, 2015   

C code snippet for another merge sort of integer list

23 August, 2015   

There is a shorter version of previous snippet for *nix systems.

C Code snippet for Dynamically Allocating a Multidimensional Array

Calculate the more near point belonging to a given segment.

C code example to check whether the given point P is inside a Triangle or Not

Displays the text message associated with the numerical error codes returned by the GetLastError api function.

Source code for Trigonometry Table made

23 February, 2015   

Some example useful C code of string functions

11 January, 2015   

There is a shorter version of previous snippet for *nix systems.

28 October, 2013   

C code example how to measure time of execution