G51PRG
This course is taught alongside G51CSA: Computer Systems Architecture, click to jump to Dave’s notes.
Lectures
Two versions of each lecture are provided — one as exactly as presented in the lecture, and the other with a white background more suitable for printing. Some lectures will also have support files, highlighted by the floppy disk icon.
-
Lecture 1printf(“Programming”);Steve Bagley24/09/2010
-
Lecture 2Getting Started with GCCDavid Brailsford27/09/2010
-
Lecture 3Procedures, Parameters, Values and Variables (part 1)Steve Bagley29/09/2010
-
Lecture 4Procedures, Parameters, Values and Variables (part 2)Steve Bagley01/10/2010
-
Lecture 5Operators and PrecedenceDavid Brailsford04/10/2010
-
Lecture 6Operators, Conditionals and Loops (part 1)Steve Bagley06/10/2010
-
Lecture 7Operators, Conditionals and Loops (part 2)Steve Bagley08/10/2010
-
Lecture 8Operators, Conditionals and Loops (part 3)Steve Bagley11/10/2010
-
Lecture 9Word Counting InterludeSteve Bagley13/10/2010
-
Lecture 11More Loops: For and NestSteve Bagley18/10/2010
-
Lecture 12Pointers and scanf()Steve Bagley20/10/2010
-
Lecture 13scanf()Steve Bagley22/10/2010
-
Lecture 14ArraysDavid Brailsford25/10/2010
-
Lecture 17Arrays, Pointers and StringsSteve Bagley01/11/2010
-
Lecture 18StringsSteve Bagley03/11/2010
-
Lecture 19Strings 2Steve Bagley05/11/2010
-
Lecture 20String ProcessingSteve Bagley08/11/2010
-
Lecture 21File Input/OutputDavid Brailsford10/11/2010
-
Lecture 23StructuresSteve Bagley15/11/2010
-
Lecture 24More StructuresSteve Bagley17/11/2010
-
Lecture 25Arrays of structsSteve Bagley19/11/2010
-
Lecture 26Heap ArraysSteve Bagley22/11/2010
-
Lecture 27Heap Arrays and the Linked ListSteve Bagley24/11/2010
Exercises
| Exercicse | Title | CW Submit ID | Due Date |
| 1 | Variables and Functions | 315 | 13/10/2010 |
| 2 | Loops | 316 | 20/10/2010 |
| 3 | For Loops and Mandelbrot | 320 | 27/10/2010 |
| 4 | Arrays | 324 | 5/11/2010 |
| 5 | Strings and Files | 335 | 24/11/2010 |
| 6 | C Program Formatter | 337 | 09/12/2010 |
Exercises will be set weekly. Exercises will normally be released on a Monday after the G51PRG lecture, and due in the following Wednesday (i.e. 8 or 9 days, and 3 lab sessions). Late submissions are acceptable until the 12:00 on the Monday after submission at which point a model answer will be released.
Coursework Submission
Coursework submission is in two-parts. The first part requires you to demonstrate
your working program to your Preceptor in the lab (either Tuesday or Fridays lab). The second submission is an electronic
submission of your source code using the cw submit command on the school’s UNIX machines.
Your file should be named username-g51prg-ex1.c, where username should be your username and ex1 should be modified as appropriate for the exercise being submitted. If your file
is not named this, then you can rename it either via Windows (use your H:\ drive)
or via the UNIX command line:
mv myfile.c srb-g51prg-ex1.c
Please take special care when typing this as you could either delete your source code,
or overwrite another file without warning. Read and reread the command before you
press ENTER.
With the file correctly named, you can now submit it using the cw submit command like so:
cw submit srb-g51prg-ex1.c
and follow the prompts that are supplied. You will need to enter the correct CW Submit ID listed in the table above (but check it matches that presented in the menu—if they don’t match use the one provide in the menu).
More details about the cw system can be found here.