Tutorials

First 2 weeks

Please ensure that you have completed the following:
  1. Unix tutorial
  2. C exercises

Week 3

Describe (in English) the type of var in each of the following declarations:
(a) char** var[];
(b) int* a, var;
(c) int var(int);
(d) int (*var)(int);
(e) void (*var)();
(f) double *(*var)(double);
(g) void (*var)(void*, int);
(h) int *(*(*var)(int*))(void);
(i) void *(*var)(void *(*)(void*), void*(*)(void*),void*);
(j) int (*(*var[3])())(void (*)());

Week 4

Read the man pages for the commands listed in the lecture area. Pay particular attention to the options listed on that page. Write shell commands to perform the following tasks.
  1. Show the first five lines of a file.
  2. Show lines 30-60 of a file.
  3. List files in ~uqjfenw1/public/a1
  4. List files in ~uqjfenw1/public/a1 in reverse order.
  5. How many lines of code are in your assignment one submission?
  6. How many different users are running programs on moss?
  7. How many copies of vim are running on moss?
  8. Give a list of users running on moss and how many processes each is running (most processes at the top).
  9. Display a table like this:
    file1 has 40 lines.
    file2 has 100 lines.
    file3 has 10 lines.
    
    For the files in ~uqjfenw1/public/a1