Chapter 1: Introduction - II

Chapter Goals

Programming Languages

Programming Language Design and Evolution

(Specific and General Purpose Languages)

Programming Language Design and Evolution

(Incremental Growth)

Programming Language Design and Evolution

(Planned Languages)

Compiling a Simple Program ("Hello, World!")

Syntax

Syntax 1.1 : Simple Program

header files
using namespace std;
int main()
{
statements
return 0;
}
Example:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello, World!\n";
return 0;
}
Purpose: A simple program, with all program instructions in a main function.

 

Compiling a Simple Program

Errors (Syntax and Logic Errors)

The Compilation Process (Diagram)

The Compilation Process (Definitions)

The Compilation Process (Edit - Compile - Debug Loop)

Algorithms

Algorithms (Example)

You put $10,000 into a bank account that earns 5% interest per year. How many years does it take for the account balance to be double the original?