CS 0132 – Programming in C & Guide to UNIX

Fall Term: 2061

 

 

Class

Recitation

Time:

11-11:50

12-12:50

Days:

MWF

F

Room:

5505 Sennott Square

5502 Sennott Square

Webpage:

http://www.cs.pitt.edu/~jmisurda/teaching/cs132.htm

 

Note:  You must be signed up for the recitation.

 

Contact Information

 

Instructor: Jonathan Misurda

 

TA: Mehmud Abliz

Office:

6404 Sennot Square

Office:

6150 Sennott Square

Phone:

(412) 624-9129

Phone:

(412) 624-8464

Email:

jmisurda@cs.pitt.edu

Email:

mehmud@cs.pitt.edu

Office Hours:

TH       1-4pm

Office Hours:

MW     10-11am

F          1-2pm

 

Description

 

In the 1970s, two important computing innovations came out of the then Bell Laboratories.  The first was a new programming language that sought to bridge the gap between slow but portable high level languages often meant for a specific purpose, and machine language, the numeric instructions on which a computer operates.  The first success of this mid-level programming language called C was in the development of a multi-user operating system called UNIX. Since then C has evolved and influenced the design of many subsequent programming languages. UNIX is still used to run large computers and a smaller, free version called Linux is gaining popularity on desktop computers.

 

This class will introduce students to using the UNIX operating system, and interacting with it to do basic computing tasks.  Additionally, students will create new programs using the C programming language and explore how its simple yet powerful syntax allows for fast and effective programs.

 

Prerequisites

 

This class expects a prior knowledge of a programming language. Possible prerequisites include: CS 0004, CS 0007, or an equivalent introductory programming course in Pascal, Java, FORTRAN or BASIC.

 

Individual exceptions might be made depending on other aspects, talk to me if you have any questions.

 

Disability Resources and Services:

 

If you have a disability for which you are requesting an accommodation, you are encouraged to contact both your instructor and Disability Resources and Services, 216 William Pitt Union, (412) 648-7890, as early as possible in the term. DRS will verify your disability and determine reasonable accommodations for this course.

 

Course Purposes and Goals

 

CS 0132 is meant to introduce students to programming in the C language and to comfortably working with programs and data in the UNIX operating system. By the end of the course students should:

 

Textbooks

 

There are two texts for this course.

 

The textbook for the UNIX portion of the course is:

 

Sobel, Mark G. A Practical Guide to the UNIX System. 3rd ed. Addison-Wesley, Reading, Massachusetts, 1995.

 

The ISBN number is 0-8053-7565-1

 

The second text is a course packet for the C portion of the course.

 

CS 0132 Programming in C & Guide to the UNIX System with Edwin H. Breaux and John Wizzard listed on the cover as instructors.

 

Both can be found in the bookstore.

 

Other books may be substituted with the approval of the instructor.

 

Class Policies

 

Exams: There will be a midterm and a final in this class.  The scheduled final exam is Tuesday, December 13, 2005 from 8:00am until 10:00am. It will be held in this classroom.

 

Cheating will not be tolerated.  Anyone caught cheating will be given a zero for the test and reported to the department following University procedures.

 

Labs and Quizzes: Attending recitation is an important part of this course.  In recitation you will be able to work in a structured setting while completing small tasks (Labs). Concepts from class will be expanded upon and tested with unannounced quizzes.

 

Projects: There will be 5 out-of-class assignments given.  These are to be completed in the given time (no extensions will be given without a valid excuse.)  These are meant to be your own work; anyone found to be collaborating will be given a zero for the assignment.  Collaborating also means using code from previous terms, other universities, your friends, or finding it on Google.

 

Participation:  Attendance will not be taken, but in such a small class, any absence will be noticed.  Several unexcused missed classes will adversely affect your grade.

 

Grading

 

Your grade will be based upon 2 exams, 5 projects, labs/quizzes given in recitation (the lowest one will be dropped), and participation:

 

2 Exams

40% (20% each)

5 Projects

40% (8% each)

Labs + Quizzes

12%

Participation

8%

Total

100%

 

 

The scale for the term will be:

Percentage

Letter

97 or above

A+

93-96

A

90-92

A-

87-89

B+

83-86

B

80-82

B-

77-79

C+

73-76

C

70-72

C-

67-69

D+

63-66

D

60-62

D-

less than 60

F

 

 


Term Schedule: The topics are subject to change depending on our pace.  They are there to assist you in the readings so you can focus on those concepts prior to class.

 

For the readings, UNIX refers to A Practical Guide to the UNIX System and ProgC refers to the Course Packet.

 

 

 

Week 1 – (8/29)

Readings for this week:  UNIX Ch 1-5; ProgC Ch 1

 

Topics:

  • Introduction to the class
  • UNIX: Beginning use, file system, editing text with pico

 

Week 2 – (9/5)

Readings for this week: ProgC Ch 2

 

No Class Monday – Labor Day

 

Topics:

  • C: Beginning – Hello World
  • C: Stages of compilation, gcc

 

Week 3 – (9/12)

Readings for this week: ProgC Ch 3

 

Topics:

  • C: Data types
  • C: Operators

 

Week 4 – (9/19)

Readings for this week: ProgC Ch 4

 

Topics:

  • C: Input and Output (printf and scanf)

 

Week 5 – (9/26)

Readings for this week: ProgC Ch 6; UNIX Ch 8

 

Topics:

  • C: Control Structures (conditionals, loops)
  • UNIX: Input and Output (pipes, redirection)
  • UNIX: Editing text with vi

 

Week 6 – (10/3)

Readings for this week: ProgC Ch 5

 

 

Topics:

  • C: Functions
  • C: Parameter Passing

 

Week 7 – (10/10)

Readings for this week: UNIX Ch 13; ProgC Appendix G

 

Midterm Exam Friday 10/14 During Class

 

 

Topics:

  • C/UNIX: Makefiles and Multi-file development
  • Review for the Midterm
  • Midterm exam

 

Week 8 – (10/17)

Readings for this week: ProgC Ch 8, 11

 

 

Topics:

  • C: Preprocessor
  • C: Arrays

 

Week 9 – (10/24)

Readings for this week: ProgC Ch 15

 

 

Topics:

  • C: Structs
  • C: Unions
  • C: Pointers

 

Week 10 – (10/31)

Readings for this week: ProgC Ch 12

 

 

Topics:

  • C: Pointers (cont.)
  • C: Standard Library functions
  • C: Strings revisited

 

Week 11 – (11/7)

Readings for this week: ProgC Ch 13, 16

 

Topics:

  • C: malloc and free
  • C: Data Structures: Linked Lists

 

Week 12 – (11/14)

Readings for this week:  ProgC Ch 14

 

Topics:

  • C: File Input and Output

 

Week 13 –(11/21)

Readings for this week: UNIX Skim Part II

 

No Class Wednesday or Friday – Thanksgiving Break

 

Topics:

  • UNIX: File Utilities (grep, tar, gzip, more, etc.)

 

Week 14 – (11/28)

Readings for this week:  UNIX Ch 9-10

 

Topics:

  • UNIX: Shell Scripting in Bash
  • UNIX: Text editing in emacs

 

Week 15 – (12/5)

Readings for this week:  UNIX Skim Part II

 

Topics:

  • UNIX: Process management and multi-user commands
  • Review for Final Exam

 

Final Exam – (12/13)

 

Final Exam Tuesday, December 13, 2005 from 8:00am to 10:00am in this room