C Programming Examples


All these examples have been tested on a PC running Linux and using the 'gcc' compiler. You can extract the programs with the 'save' option under 'file' and compile with your own compiler.

o
Your first C program.
o
if.
o
while.
o
do.
o
for example 1.

for A more advanced example.
o
switch.
o
function.
o
Global and local variables.
o
Increment & decrement.
o
Pass command line arguments.
o
Print from 10 to 1 - three examples.
o
Read a file - version 1.
o
manipulate strings.
o
Using 'curses' to read a password.
o
Programs requiring X. Unix users only. 
o
Index of all example programs.
o
O'Reillys' Using C examples.
o
O'Reillys' Practical C examples.
o
Bob Stouts 'Snippets'.

Top Master Index Keywords Functions


Martin Leslie