Read: D&D, through p. 370 (through 5.12), pp. 404-411 (through 6.4)
Exercises due
Tuesday, March 24:
take a look at Assignment 3!
You can change lots of things about the look of Unix in your .cshrc
file. For example, you might make your prompt the machine name,
the time, or a directory listing. Take a look in your default
.cshrc file and see if you can figure out how to change your
prompt to something else. Feel free to look in my .cshrc file
for more ideas! It should be readable.
Want to see if your friends are logged on to the network?
who -- will list the current users of your machine
rwho -- will list the current users of any machine on the network
fn_name(type * typePtr) -- neither the data nor the pointer are constants so both may be changed within the body of the function see: $CLASSHOME/deitel-files/examples/ch05/fig5_10.cpp
fn_name(const type * typePtr) -- here the data is constant, but the pointer may be changed within the function, see: $CLASSHOME/deitel-files/examples/ch05/fig5_11.cpp Note -- only the data being pointed to is being passed call-by-reference, the pointer itself is passed call by value. Changes to it are not reflected in the calling program. See: $CLASSHOME/deitel-files/examples/ch05/fig5_11.cpp
fn_name(type * const typePtr) -- here the data can be changed, but the pointer itself cannot be (but see the note above anyway!). This SHOULD be the way the swap function in figure 5.15 was implemented. To see it in use, see the file: $CLASSHOME/deitel-files/examples/ch05/const-5-15.cpp Note -- if this were an array, then having a const pointer would mean that array subscript notation would need to be used to access the array elements. (That is what is the case in the bubble sort -- so the updated file has const there too!)
fn_name(const type * const typePtr) -- here the data and the pointer are both constants. Notice how the program in figure 5-11 can be rewritten this way -- using array subscript notation instead of pointer-incrementing. See the file: $CLASSHOME/deitel-files/examples/ch05/const-const-5-11.cpp