CS13002 Programming and Data Structures | Spring semester |
Contents
- Introduction
What is a digital computer?
The basic components of a digital computer.
How does a program run in a computer?
Why need one program?
How can one program?
Your first C programs
- Variables and simple data types
Basic data types
Constants
Variables
Typecasting
Representation of numbers in memory
Introduction to arrays
- Assignments
Assignments and imperative programming
Built-in operators
- Input/Output
Standard input/output
File input/output
String input/output
Formatted input/output
- Conditions and branching
Logical conditions
The if statement
The if-else statement
Nested if statements
Multi-way branching
- Loops and iteration
Mathematical induction
Recursive definitions
Loops
Loop invariants
Nested loops
Flow control inside loops
- Exercise set I
- Functions and recursion
Translating mathematical functions in C
Function prototypes
Built-in libraries
Passing parameters
Recursive functions
Recursion or iteration?
- Arrays
Passing arrays to functions
Strings
Arrays and pointers
Multi-dimensional arrays
- Exercise set II
- Structures
Defining structures
Passing structures to functions
Structures with self-referencing pointers
Unions
- Pointers and dynamic memory management
One-dimensional dynamic memory
Two-dimensional dynamic memory
- Exercise set III
- Abstract data types
What is an abstract data type?
How to implement an abstract data type?
A complete example : the ordered list ADT
- Stacks and queues
The stack ADT and its applications
Implementations of the stack ADT
The queue ADT and its applications
Implementations of the queue ADT
- Exercise set IV
- Performance analysis of programs
Resource usage of a program
The order notation
Worst-case versus average complexity
How to compute the complexity of a program?
- Exercise set V
Animation examples