Types, declarations, variables, literals
Basic types
int n;
char c;
float x;
int a,b,c,d;
int year = 1988;
char field_separator = '\t';
float pi = 3.14159;
Variables can be initialized in a declaration, any constant expression
....may be used.
Character constants delimited by single quotes.
Arrays
int dept[20];
char buffer[100];
int primes[] = { 2, 3, 5, 7, 11, 13, 17, 19 };
float BigMatrix[10][10];
Elements of dept[20] are dept[0] ...
dept[19]. Indices always start at
....0. dept[20]
doesn't exist, but compiler doesn't catch range errors.
Initial array values delimited by {and
}.Compiler will figure out size
....for you.
Multidimensional arrays are simply arrays of arrays of arrays.