Study Note: Programming in C
NoteProgramming in C
An algorithm is a finite set of clear steps; a flowchart shows it graphically (oval: start/stop, parallelogram: input/output, rectangle: process, diamond: decision). A compiler translates the whole program at once; an interpreter line by line. Paradigms: procedural, structured, object-oriented (class, object, encapsulation, inheritance, polymorphism).
C (Dennis Ritchie, Bell Labs, 1972): data types int, float, char, double; operators; if-else, switch; loops for, while, do-while; arrays;
functions; structures and unions; pointers (variables holding addresses: int *p = &x;). Every C program starts executing at main().