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.

  1. Lecture 1
    printf(“Programming”);
    Steve Bagley
    24/09/2010
  2. Lecture 2
    Getting Started with GCC
    David Brailsford
    27/09/2010
  3. Lecture 3
    Procedures, Parameters, Values and Variables (part 1)
    Steve Bagley
    29/09/2010
  4. Lecture 4
    Procedures, Parameters, Values and Variables (part 2)
    Steve Bagley
    01/10/2010
  5. Lecture 5
    Operators and Precedence
    David Brailsford
    04/10/2010
  6. Lecture 6
    Operators, Conditionals and Loops (part 1)
    Steve Bagley
    06/10/2010
  7. Lecture 7
    Operators, Conditionals and Loops (part 2)
    Steve Bagley
    08/10/2010
  8. Lecture 8
    Operators, Conditionals and Loops (part 3)
    Steve Bagley
    11/10/2010
  9. Lecture 9
    Word Counting Interlude
    Steve Bagley
    13/10/2010
  10. Lecture 11
    More Loops: For and Nest
    Steve Bagley
    18/10/2010
  11. Lecture 12
    Pointers and scanf()
    Steve Bagley
    20/10/2010
  12. Lecture 13
    scanf()
    Steve Bagley
    22/10/2010
  13. Lecture 14
    Arrays
    David Brailsford
    25/10/2010
  14. Lecture 17
    Arrays, Pointers and Strings
    Steve Bagley
    01/11/2010
  15. Lecture 18
    Strings
    Steve Bagley
    03/11/2010
  16. Lecture 19
    Strings 2
    Steve Bagley
    05/11/2010
  17. Lecture 20
    String Processing
    Steve Bagley
    08/11/2010
  18. Lecture 21
    File Input/Output
    David Brailsford
    10/11/2010
  19. Lecture 23
    Structures
    Steve Bagley
    15/11/2010
  20. Lecture 24
    More Structures
    Steve Bagley
    17/11/2010
  21. Lecture 25
    Arrays of structs
    Steve Bagley
    19/11/2010
  22. Lecture 26
    Heap Arrays
    Steve Bagley
    22/11/2010
  23. Lecture 27
    Heap Arrays and the Linked List
    Steve Bagley
    24/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.