for (a), passing by value actually creates a copy of the parameter in memory, and passes that copy to the function. This means that A) you are using more memory and time to copy, and B ) any modification to the passed in value will not reflect on the calling variable once the function goes out of scope. The argument passed by value is treated as a local variable, and will be destroyed when the function ends.
Passing by reference passes the actual argument, by means of its memory address, to the function. This means only an address is copied (usually the size of an integer) to the function. Any modification to this parameter will be reflected once the function ends, as it is the
actual variable you are modifying.
value is beneficial when you are passing small data values (ints, bools, chars, etc), as it makes a copy of the parameter for modification, without any repercussions. Any sort of data structure should be passed by reference, because the cost of copying the entire thing makes it inefficient. Also, all arrays are passed by reference (for the same reason). You can also pass a const reference if you don't want the function to modify any of the values.
In terms of (d), google is probably a better help then I could in explaining everything about linked lists. Basically a linked list is a collection of nodes, each of which contain pointers to the next node in the list. Traversal is easy, as you just keep moving to the next node in the list. Things like binary search, reversals, etc, are a bit more complicated and often inefficient. Check
this site or
this DIC code snippet to enjoy all linked lists have to offer.
This post has been edited by kdbolt70: 16 Dec, 2007 - 10:30 AM