IT Program Design

101 - Fundamentals of C Programming

  • Module Overview
  • File Link: module-overview.pdf
  • This module should not bring any new programming principle to what you learned from the pre-requisite introduction to programming you took before this offering. Instead, your focus should be to review what you already learned in another programming language & learn how it works in the language we will be studying this semester.
  • Readings - Textbook
  • For this module, you should read the following sections of the textbook;
    • Chapter #2: Introduction to C programming
    • Chapter #3: Structured program development in C
    • Chapter #4: C Program Control
  • Readings - How to program
  • File Link: how-to-program.pdf
  • This guide is there to de-mystify the programming process and give you some guidelines to follow when you're trying to think your way thought a programming problem. You should do all practice assignments and graded ones with these advices in mind. It might be good to even re-do some apprenticeship exercises this way. Following the processes taught in this PDF will save you a lot of time which you would otherwise spend trying to fix bugs in hastily written programs
  • Video Lecture - Development Environment
  • File Links: development-environment.mp4 development-environment.ppt
  • This video details how the GCC Compiler transform your source program, stored in a text file, into an executable. Along the way, we explain what are the various components of the Compiler and how they are chained with one another (pre-compiler, compiler, assembler and linker).
  • Video Lecture - Scanf Mysteries
  • File Links: scanf-mysteries.mp4 scanf-mysteries.pdf
  • This video explores the mysteries of the infamous scanf-which-returns-without-reading-a-character along with how to keep reading from the user until they hit ctrl-D to notify and end of data. Take also a look at the pdf file which provides a more generic solution than using a single getchar(). It came from a question during spring 2009 which followed-up this video.
  • A word before you work on these
  • Each of the following exercises are good practice to make sure you are able to apply what you just learned in the lectures / readings section. If you feel good about what you read but you are unable to apply it, this means you have not understood it so head over to the forums & ask for help on these exercises. To help you further, each exercise comes with a step-by-step video of how to solve it. It might be tempting to just watch the solutions but then you might just miss what you already missed in the readings which prevents you from doing these exercises :) Instead, make sure you use the videos to help you make steady progress;
    • Read the instructions
    • Watch the beginning of the video if you have problems getting started, then pause it
    • Work on the exercise
    • Watch some more of the video as necessary
    • Keep doing this & post questions to your offering forum as needed
    When you are done with these exercises you should have a good guarantee you understood the lecture material. In addition, you will note that these videos, unlike lectures or demonstrations of solutions, focus on showing you how to program, rather than discussing the end result only. This apprenticeship is a big part of your learning in this offering.
  • PA101 - Instructions
  • File Links: instructions.pdf
  • This first PA is about "Learning the Ropes". This is the only PA which will have you write more than one program.
  • Video Lecture - Getting started with this PA
  • File Links: PA101-intro.mp4
  • This video will help you get started on this PA.
  • PA101 - Templates
  • File Links: templates.zip
  • If you are using the Student Linux Box virtual machine, you do not need to download this material. This will be true of all PAs used on this site, we might just not repeat this warning all the time. If your instructor asked you to use the Code::Blocks IDE differently, then download this zip file and extract it where you want your project' folder. You will then be able to open a project inside Code::Block to work on it. You will have to zip again the folder to submit your work. Just make sure to not submit the original zip. The PA101.zip file contains the following directory structure under a folder named "PA101":
    • PA101-prog1
    • PA101-prog2
    • PA101-prog3
    • PA101-prog4
    Each of these sub-folders is a full, independent, Code::Block project folder