CPROG101 - Introduction to the C Programming Language
In this course some of the basics of the C language are introduced. A short overview of the language is provided, along with several programming exercises. This is the first in a series of courses that cover the C language.
The course outline is as follows:
- Introduction
- The Compiler
- Excercise 1 - The "Hello World" Program
- The "#include" compiler directive
- The "main" function
- The "printf" function
- The "return" statement
- Statements and Compound Statements
- White Space
- Comments
- Variables
- User Input and Output
- stdin and stdout
- Escape Sequences
- scanf
- printf
- getchar
- putchar
- Exercise 2 - "What is your name"
- Basic Arithmetic
- Arrays
- Pointers
- Types and Typcasting
- Exercise 2 Revisited - Buffer Overflow Fix
- Program Control - Part 1
- The "if" statement
- Looping
- The "while" statement
- The "continue" statement
- The "break" statement
- The "for" statement
- Exercise 3 - A Simple Calculator
- Exercise 4 - Printing a multiplication table
- Program Control - Part 2
- The "do"..."while" loop
- The "switch" statement
- The infinite loop
- Functions
- Exercise 5 - A simple menu program
- Summary
This course assumes that you have a C compiler installed, that you know how to use it to compile programs, that you have some sort of text editor for writing programs, and that you have basic computer skills. It is recommended that before taking this course that you take GCC101 if you are going to use the free gcc compiler.
To register for this course, you must have a student account.
If you have a student account select "Register for Course" and if you do not have a student account select "Create Student Account" and return to this page to register for the course
or
Create Student Account