HIDE NAV

Intro. to C & Programming


General Terminology



Source Code   plain text written by a programmer in a programming language which can be translated into machine language somehow.


Program   list of instructions in machine language
  A program is stored as an executable binary file


Compiler   a piece of software that reads source code and outputs executable binaries (programs)


Interpreter   a program that creates machine instructions on-the-fly while reading source code.
  For instance your web browser is an interpreter for HTML CSS and Javascript source code.


Syntax   structural rules of a programming language (e.g. 'punctuation')


OpCode   an operation number code. These are binary number codes that represent operations a cpu can perform.


Clock Cycle   the period of the system clock signal. A clock cycle is the base unit of time for a central processing unit.
  OpCodes typically execute in one clock cycle.


Components of C Source Code



Directives   instructions for the compiler that don’t get built into the final program


Formatting   white space (space, tab, line return) and comments ( // and /* */ ) are ignored by the compiler, but improve readability


Variables   indicate places in memory to store binary data with a readable name. All variables are classified into data types to indicate how the binary is interpreted.


Operators   indicate logic, arithmetic, comparison or storage operations. Ex: = + - * / & |


Flow Control   conditional logic to make decisions based on true and false (boolean) logic. Flow control mainly exists as branches (either do this or that) or loops (repeat this).


Functions   useful sequences of instructions can be packaged into subroutines so they can be reused easily. This is named for similarity to functions as defined in mathematics.


Data Structures   Many individual pieces of data (variables) can be packaged into larger structures.