Lecture 1 - Page 21 : 29
Notes about C++
From C to C++
* Course Introduction
Overview of Advanced Programming - Part One
Overview of Advanced Programming - Part Two
Recommended use of your time
Course Approach - Part 1
Course Exam
Which compiler or IDE?
* A quick tour of C
Basic Observations
The Evolution of C
The Popularity of C and C++
The C preprocessor
Fundamental types
Arrays and Pointers
Arrays and Pointers: Examples
Structures and Unions
Structures: Examples
Function types
User defined types
Expressions and operators
Control structures
Functions and parameters
Call-by-reference parameters via pointers
C Program organization
Memory Allocation
The standard library
* C/C++ Compatibility
C/C++ Compatibility
C/C++ Compatibility - some small details
Control structures
The control structures in C are well-known - and almost identical - to control structures in other languages in the C family
Selection
if
conditional and
if-else
switch
- with the
break
issue!
Iteration
while
and
do-while
for
C++: Can declare local variables (of one type) in the initialization part
C: This is not possible in ANSI C - C89
Ohter control mechanisms in C
goto
,
break
,
continue
Blocks:
{...}
A program with a for loop in C.
Program output.
Illustration of local variables in a for loop in C++.
Program output.