Computers for Physicists
2nd semester, 2003/2004, Lecturer: Dr. Rennan Barkana

Notes:

Lecture Date Topic Sections in

Kernighan & Ritchie

Lecture (PDF) Recitation (PDF) Exercise
29/Feb/2004 Introduction, Variable Types, Arithmetic Operations 2.1, 2.2, 2.4, 2.5 Lecture 1 Notes Recitation 1 Notes
14/Mar/2004 Arithmetic Precedence, Binary Numbers, Increment Operator 2.5, 2.8, 2.10 Lecture 2 Notes Recitation 2 Notes Exercise 1

Solution 1

21/Mar/2004 Relational and Logical Operators, if-else, Loops 2.6, 2.11, 2.12, 3.1, 3.2, 3.3, 3.5, 3.6 Lecture 3 Notes Recitation 3 Notes Exercise 2

Solution 2

28/Mar/2004 Arrays, Functions 1.6, 1.7, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6 Lecture 4 Notes Recitation 4 Notes

Solution (text)

Exercise 3

Solution 3

18/Apr/2004 More Functions, The C Preprocessor 4.10, 4.11 Lecture 5 Notes Recitation 5 Notes Exercise 4

Solution 4

25/Apr/2004 Input/Output, Pointers 7.2, 7.4, 5.1, 5.2 Lecture 6 Notes Recitation 6 Notes Exercise 5

Solution 5

02/May/2004 More Pointers, Structures, Final Project 5.3, 6.1 Lecture 7 Notes Recitation 7 Notes

(also Exercise 6)

09/May/2004 Pointers and Arrays, More Structures 5.4, 5.6, 5.7, 5.9, 6.2, 6.3 Lecture 8 Notes Recitation 8 Notes
16/May/2004 Pointers to Structures, Pointers to Functions, Dynamic Memory 6.4, 6.5, 5.11, 7.8.5 Lecture 9 Notes
23/May/2004 Linked Lists, Strings 2.3, 5.5 Lecture 10 Notes
30/May/2004 Files, Command-line Arguments 7.5, 7.6, 5.10 Lecture 11 Notes
06/Jun/2004 Intro to Numerical Recipes Lecture 12 Notes