Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
Duane's Incredibly Brief Introduction to the C Programming Language The one best book on C is The C Programming Language by Kernighan and Richie.
 

Summary: Duane's Incredibly Brief Introduction to the C Programming Language
The one best book on C is The C Programming Language by Kernighan and Richie.
The 'g' in 'Kernighan' is silent.
CODE
Code for execution goes into files with ".c" suffix.
Shared decl's (included using #include "mylib.h") in "header" files, end ".h"
COMMENTS
Characters to the right of // are not interpreted; they're a comment.
Text between /* and */ (possibly across lines) is commented out.
DATA TYPES
Name Typ. size Description
char 1 byte an ASCII value: e.g. 'a' (see: man ascii)
int/long 4 bytes a signed integer: e.g. 97 or hex 0x61, oct 0x141
long long 8 bytes a longer mult-byte signed integer
float 4 bytes a floating-point (possibly fractional) value
double 8 bytes a double length float
char, int, and double are most frequently & easily used in small programs
sizeof(double) computes the size of a double in addressable units (bytes)
Zero values represent logical false, nonzero values are logical true.
Math library (#include , compile with -lm) prefers double.

  

Source: Albrecht, Jeannie - Computer Science Department, Williams College

 

Collections: Computer Technologies and Information Sciences