Systems Level Programming - Week 3

Exercises and lab work for week 3

Tutorial exercises

  1. How do we declare and assign to pointers. How does dereferencing work?
  2. As an example consider the following C code.
    int i;
    int * ip;
    
    How do we set ip to point to i?
  3. Having set ip to point to i, we then say
    i = 6;
    
    How do we access and print the value in i through the pointer ip?

Lab work

The milestone for this week is number 4. You may skip intermediate exercises only if you are completely confident of your ability to do them!