CST 160: Introduction to Programming

School of Professional Studies

Saint Louis University , Saint Louis, Missouri


Syllabus

Syllabus includes a description of course, meeting times, grading policy, etc.


Lecture Notes

Lecture 3

Lecture 2

Lecture 1


Assignments

Assignment 5:
Reading: Chapter 5 (5.7 - 5.12)
Programming: 5.9, 5.16, 5.24

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


Solutions and code examples

Figures
Chapter 5 : 5.3 , 5.4 , 5.7 , 5.8 , 5.9 , 5.10 , 5.12 , 5.14 , 5.15 ,
Chapter 4 : 4.1 , 4.2 , 4.5 , 4.6 , 4.7 , 4.9 , 4.11 , 4.12 ,
Chapter 3 : 3.6 , 3.8 , 3.10 , 3.13 ,
Chapter 2 : 2.1 , 2.3 , 2.4 , 2.5 , 2.13 ,

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 ,


Frequently asked questions


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


Miscellaneous Information

Instructor: Irfan Pyarali
Office Phone: (314) 935-7492
Home Phone: (314) 993-7114
E-Mail: irfan@cs.wustl.edu
WWW: http://www.cs.wustl.edu/~irfan

Teaching Assistant: Yasra Abro
E-Mail: abroyp@slu.edu

Emacs Cheat Sheet : PDF version , Postscript version