C Source Code Examples

This page contains 100+ C programming source code examples. All the C programming source code examples are up to date and are well-tested in our development environment.

We covered source code examples on various C programming language standard libraries:
  • <stdio.h>: Standard Input and Output library
  • <stdlib.h>: Standard Library
  • <string.h>: String Operations library
  • <math.h>: Mathematics library
  • <time.h>: Time library
  • <ctype.h>: Character Type library
  • <errno.h>: Error Number library
  • <assert.h>: Assertion library
  • <limits.h>: Sizes of Basic Types library
  • <setjmp.h>: Jump library
  • <signal.h>: Signals library

C Programming Examples

Standard Input/Output Library Functions

  1. scanf() in C - Source Code Example
  2. printf() in C - Source Code Example
  3. sprintf() in C - Source Code Example
  4. sscanf() in C - Source Code Example
  5. fopen() in C - Source Code Example
  6. fclose() in C - Source Code Example
  7. fwrite() in C - Source Code Example
  8. fread() in C - Source Code Example
  9. fgets() in C - Source Code Example
  10. fputs() in C - Source Code Example
  11. getchar() in C - Source Code Example
  12. putchar() in C - Source Code Example

String Operations Library Functions

General Utilities Library Functions

Mathematical Library Functions

Character Library Functions

Time and Date Library Functions

Signal Handling Library Functions

Non-local Jumps Library Functions

Assertion Library Functions


Comments