CS209 lab6


http://www.maths.nuigalway.ie/~gettrick/teach/cs209/l6.html




http://www.maths.nuigalway.ie/~gettrick/teach/cs209/progs/
This lab is based on using structures and pointers in C to do manipulations on linked lists. The starting point for the lab is the program strc.c at http://www.maths.nuigalway.ie/~gettrick/teach/cs209/progs/strc.c: You should spend at least 30 minutes studying this program (& of course run it).

  1. Add a new function insertN(struct list *x, int num, int pos, int n) that will insert n copies of the integer num at position pos, if that is possible (if pos is too big, take appropriate action).
  2. Modify the search function so that it prints out all positions where the data item is found.

© NUI, Galway