Assignment 4:
Reading: Chapter 4 (4.6-4.12) and Chapter 5 (5.1 - 5.6)
Programming: 4.13, 4.19, 4.28
Assignment 3:
Reading: Chapter 4 (4.1-4.6)
Programming: 3.21, 3.25, 3.28
Assignment 2:
Reading: Chapter 3
Programming: 2.16, 2.23, 2.30, 2.31
Assignment 1:
Reading: Chapters 1 and 2
Programming: 2.21 and 2.25
Instructions on mailing code:
zip -r - <file1> <file2> | uuencode "assignment_#" | mail irfan@cs.wustl.edu
example:
zip -r - program1.c program2.c | uuencode "assignment_1" | mail irfan@cs.wustl.edu
Alternate Instructions on mailing code for assignment (since zip is not working):
cat <file1> <file2> | mail irfan@cs.wustl.edu
example:
cat program1.c program2.c | mail irfan@cs.wustl.edu
Examples
Chapter 5 :
5.45 ,
5.46 ,
Chapter 4 :
4.9 ,
Chapter 3 :
3.29 ,
3.30 ,
Quiz
Chapter 4 :
4.9 ,
Chapter 3 :
3.17 ,
Chapter 2 :
2.24 ,
Exercises
Chapter 5 :
5.9 ,
5.15 ,
5.16 ,
5.18 ,
5.24 ,
5.25 ,
5.35 ,
5.37 ,
Chapter 4 :
4.12 ,
4.13 ,
4.14 ,
4.19 ,
4.28 ,
Chapter 3 :
3.20 ,
3.26 ,
3.21 ,
3.25 ,
3.28 ,
Chapter 2 :
2.16 ,
2.19 ,
2.21 ,
2.23 ,
2.25 ,
2.30 ,
2.31 ,
Question: I can't get any of the math functions (such as sqrt, ceil, etc.) to work in my programs. I have included the statement "#include <math.h>" in the programs. Suggestions?
Answer: You need to change your compile line:
cc program1.c -lm
The -lm says: link in the math library.
Question: I am having problems compiling my program:
% cc first
ld: Object file format error in: first: read_cur_obj_info: bad file magic number
Answer: Rename your file to first.c
Teaching Assistant:
Yasra Abro
E-Mail: abroyp@slu.edu
Emacs Cheat Sheet : PDF version , Postscript version