Difference between revisions of "StartingC"

From SourceWiki
Jump to navigation Jump to search
Line 6: Line 6:
 
</pre>
 
</pre>
  
= A Quintessential Start =
+
=A Quintessential Start=
  
 
<pre>
 
<pre>
Line 23: Line 23:
 
./hello.exe
 
./hello.exe
 
</pre>
 
</pre>
 +
 +
=Types=
 +
 +
int
 +
char
 +
float
 +
double
 +
 +
short & long
 +
 +
sizeof()
 +
casting
 +
 +
=The C Preprocessor=
 +
 +
=Loops & Conditionals=
 +
 +
if then else
 +
 +
(switch) case (default - fall through)
 +
 +
while and for
 +
 +
break & continue
 +
 +
=Functions & Header Files=
 +
 +
=Arrays & Pointers=
 +
 +
address, dereference
 +
address arith
 +
2d arrays
 +
 +
=Structures=
 +
 +
DAB again
 +
 +
watch out for padding

Revision as of 16:05, 18 August 2009

startingC: Learning the C Programming Language

svn co http://source.ggy.bris.ac.uk/subversion-open/startingC/trunk ./startingC

A Quintessential Start

cd startingC/examples/example1

we will be using make

make

and run the classic program

./hello.exe

Types

int char float double

short & long

sizeof() casting

The C Preprocessor

Loops & Conditionals

if then else

(switch) case (default - fall through)

while and for

break & continue

Functions & Header Files

Arrays & Pointers

address, dereference address arith 2d arrays

Structures

DAB again

watch out for padding