Computer Science 301
C Programming in Unix

Fall A 2023, Siena College



Dr. James D. Teresco, Roger Bacon 308, (518) 782-6992
Electronic mail: jteresco AT (best contact method)
Twitter: @JTerescoSienaCS
Class URL: [Link]
Lab meetings: Thursday 2:40-4:40, Roger Bacon 330
Office hours: Monday 9-11, Tuesday 2:30-4, Thusday 9:30-10:30, and by appointment

Course Communications

Communications outside of class will be via email to your Siena College email account. Please check it regularly (multiple times daily during business hours) for class-related messages. You are responsible for being aware of all communications made via email. Class materials will be linked from the course website and our Canvas course.

Substantial changes to this syllabus are not anticipated, but any changes will be announced in class and updated in the online version of the syllabus.

Learning Goals and Mission Statements

Course Objectives

From the course catalog: "This course is an introduction to C programming using the Unix operating system. The course is designed for individuals who understand programming constructs and concepts in another programming language. No prior Unix experience is necessary. Students will develop a proficiency with Unix and the C programming language that will be helpful for upper-level courses, particularly CSIS-330, Operating Systems, and CSIS-335, Parallel Processing and HPC. Topics to be covered include basic C syntax and program structure, separate compilation, functions, structures, pointers, and memory management. Unix tools including the Emacs editor, the Make utility, the GNU C compiler, and the GNU debugger will be used."

This course satisfies an elective requirement for the Computer Science (all tracks) or Software Development major. It serves as a prerequisite or co-requisite for courses in which C programming experience is needed. This is a 1 credit course, and it carries the ARTS attribute.

Our specific learning objective for CSC 301 include the following:


You should be able to design and implement programs in a high-level language (e.g., Java, C#, C++), including appropriate documentation. The assumption is that you are most familiar with Java. Specifically, you will be expected to understand concepts including sequential execution, declaring and using variables, data types, evaluation of arithmetic and logical expressions, conditional execution, repetition, calling functions (which are C's equivalent of methods) with and without parameters, returning values from functions, custom data structures (structs in C, classes in Java), and elementary general-purpose data structures (arrays, lists, stacks, queues, priority queues, trees).


The required text for the course is The C Programming Language, 2nd Edition (Prentice-Hall, 1988, ISBN 0-13-110362-8) by Brian W. Kernighan and Dennis M. Ritchie. This is available from the Siena Bookstore (and elsewhere). If you buy elsewhere, be sure to get the correct edition. It's a handy book for any computer scientist to own, so think of it as an investment.


The course is organized as a series of lab exercises. There will be an introduction to each and students will have time during our meetings to start work and ask questions. There is no formal attendance policy, but a lack of regular attendance is certain to result in lower grades on labs and the exams. Do not expect sympathy if you are struggling but are rarely seen in class and during office hours. Supplemental readings are listed on the lab and reading schedule.

Be prompt, prepared, and ready to focus on the day's work. This should go without saying, but this means your phones and other devices not being used exclusively to follow along with class materials and/or to take notes must be powered off. The Course Schedule has a link to a web page for each lecture/lab highlighting the day's topics, listing class examples, and the new assignment. The notes used to guide any in-class presentations will also be available as PDF files linked from the Course Schedule.

Assignments will include several types of items. Different requirements apply to each, as described below. It is important that you adhere to file format and naming requirements to facilitate grading. Submissions that do not meet these requirements will not be accepted.

Lab Questions
The answers to all "lab questions" for a particular lab should be answered within your shared document copy of the lab document.

Note: for lab questions that ask you to draw a memory diagram, you have a few options. You may attempt to represent the memory with plain text, but that is difficult to construct and read. Ideally, you would use a drawing program and submit a PDF file, but you are also permitted to draw the diagram on paper and submit a scan or photograph, as long as the diagram is legible in that form.

Output Captures
You will sometimes be asked to capture the output of an existing Unix command or one of your programs in a file for submission. The file name to use for each such task will be specified in the question.
Practice Programs
Your submissions for practice programs are graded primarily on correctness, but you will be required to include your name at the top of the program, and you must use the file name specified.
Programming Assignments
These are the most formal submissions and will be graded on design, documentation, style, correctness, and efficiency (where appropriate). A good design will use an appropriate algorithm, data structures, and language constructs to solve the problem. A well-documented program will include a comment at the top of each file that includes your name, the assignment, and a description of the contents of the file. There should also be comments for each structure definition, each function definition (including a brief description of the function's purpose, its parameters, and return value), each variable or group of related variables, and any section of code whose purpose and/or behavior is not obvious from context or the code itself. Style requirements include appropriate formatting (sufficient and consistent indentation, spacing, and punctuation, wrapping long lines of code), good use of constants, and meaningful and appropriate names for variables, functions, constants, and parameters. Correctness, of course, requires the expected output be produced for a set of test inputs (which will normally not be provided in advance). Efficiency will be more important in some assignments than others, and requires that the program does not do any unnecessary computation or use any more memory than needed. This includes returning memory to the system when using dynamic memory management. And, of course, you must use the file name specified.

You are strongly encouraged to develop your C programs using a genuine Unix environment (our course FreeBSD system or your own Macintosh or Unix/Linux system). If you choose to develop your programs anywhere other than our course FreeBSD system, it is your responsibility to ensure that your program works on the grading platform. Of course, tasks where you are asked to use Unix tools will need to be completed in a Unix environment.

Unless otherwise specified, late lab assignments may be turned in with a penalty computed as 1.08h%, where h is the number of hours late. Extensions will only be granted in serious situations. You can find a C program that prints out a table of the late penalties here. Work turned in after solutions have been made available cannot receive credit. Note that as a 1-credit course, the expectation is for a minimum of 45 hours of effort to complete the work for the entire course (including readings, labs, and exams). Since we are doing this over the first half of the semester, expect to spend several hours per week. Some may be able to finish in a shorter total time, but as with any task that involves programming, the time needed could be significantly longer in some cases.

All assignments are to be submitted electronically unless otherwise specified.


There will be periodic assessments/quizzes throughout the course, and a take-home final exam coming out following our last lab meeting. Details about all of these will be made available as they get closer. You should plan to complete all of the labs due before each quiz/exam, as they cover exactly those things you learned about and practiced in the labs.


Grades for individual assignments and exams are not scaled. Any scaling deemed appropriate will take place at the end of the semester by adjusting the thresholds. The following thresholds may be adjusted downward (thereby raising grades) but will never be adjusted upward.


Labs 75% A >= 93% A- >= 90%
Assessments/Exams 25% B+ >= 87% B >= 83% B- >= 80%
C+ >= 77% C >= 73% C- >= 70%
D+ >= 67% D >= 65% D- >= 60%
F < 60%

Course grades will only be changed after they are submitted except in very specific cases (such as an error in grading of an assignment or in computation of a grade). Any such errors that slip through must be found and rectified quickly after grades are submitted. In rare circumstances, a student request for an incomplete grade may be approved at the discretion of the instructor. Requests must be made one week prior to the end of the semester, and terms of such arrangements must be mutually agreed upon before grades are submitted. College policy states that the an incomplete must be reconciled within one month of the end of the semester, and that a student cannot be granted a degree with an incomplete grade on his or her record.


Please be sure you are familiar with the Siena College Student Class Attendance Policy.

Every college student should be motivated to attend every class meeting for all the right reasons (e.g., desire for knowledge, getting your money's worth, etc.). You surely understand that regular attendance is essential to your ability to master the course material.

Therefore, there is no formal attendance policy. You are expected to attend regularly, and should contact the instructor about any absences. Absences for which accommodations may be provided include any of the following:

  1. A documented athletic or academic event that conflicts with a class meeting. The required paperwork must be presented in person at least one week prior to the event.
  2. Bereavement or other family emergency. These must be documented through the Office of Academic Affairs, who will then contact your instructors.
  3. Medical leave. Health Services or the Counseling Center will submit a recommendation to the Dean of Students Office and a medical leave will be initiated for absences of five or more days. The Dean's Office will contact your instructors.
  4. Other personal illness. You should not attend class when you are ill, especially if you may be contagious.

If you must miss a class meeting, you can request that a meeting be live-streamed and/or recorded on Zoom. These options are better than missing the meeting altogether, but are a poor substitute for in-person attendance.

While there is no formal penalty, missing class regularly, frequent tardiness, or being distracted in class (e.g., checking your phone) will be considered a sign that you are not taking the course seriously. Attendance is taken daily, with late arrivals and evidence of distraction or inattention noted as needed. Common sense suggests and experience validates that students who are frequently absent, late, or inattentive do not learn the material, and this is reflected in poor grades. Do not expect compassion when final grades are assigned or extensive extra help if you do not understand a topic that was covered while you were absent without good reason.

Academic Integrity

You are encouraged to discuss the concepts related to course assignments and exams with your classmates. This is an essential part of a healthy academic environment. However, work submitted for grading must be your own (or the combined work of group members, for group assignments). Any unauthorized copying, collaboration, or use of generative artificial intelligence, such as ChatGPT and other platforms that generate text, code, artwork, etc. (except where explicitly permitted on an assignment or exam), is considered a breach of academic integrity and will not be tolerated. Academic dishonesty cases are unpleasant and uncomfortable for everyone involved. You are responsible for reading and understanding the College's Academic Integrity Policy and the Computer Science Department's Academic Integrity statement. The minimum penalties for a first violation will include failure (0 grade) for the assignment or exam in question and the filing of an Academic Integrity Violation Accusation Form. A second violation will result in failure of the course and a formal letter describing your misconduct will be sent to the head of the Computer Science Department and the Office of Academic Affairs. Students suspected of violating academic integrity will be referred to the Academic Integrity Committee for final determination.

If there is any doubt about the degree of collaboration allowed or the permitted sources for a particular assignment, please ask for clarification before collaborating or consulting the source. Any such collaborations or sources must be cited properly.

Additional College Policies

The following are College policies that apply to all courses at Siena.

Accommodations Policy

In compliance with the Americans with Disabilities Act and with Section 504 of the Rehabilitation Act, Siena College is committed to ensuring educational access and accommodations for all its registered students.

The Office of Accessibility allocates reasonable academic accommodations to students with documented disabilities. If you need assistance due to a disability, please contact or drop by Foy Hall 109A to discuss further.

Complaints about services provided or not provided may be brought to the attention of Public Safety at 518-783-2376 or Ms. Lois Goland, JD, Title IX Coordinator and Equal Opportunity Specialist (SSU 235, 518-782-6673).

Mental Health and Counseling Resources

For any number of reasons, you may become overwhelmed during your time at Siena. It is very common to experience symptoms of anxiety, depression or other mental health conditions. Fortunately, the Counseling Center, located in Foy Hall Room 110, is a resource to help overcome those potential challenges. You can make an appointment by stopping by, calling 518-783-2342, or requesting one online on the Siena Counseling Center webpage. In addition, for urgent matters after 4PM, there is an on-call therapist who may be accessed by calling Public Safety at 518-783-2376.

Inclusive Classroom

In our Franciscan community, diversity is an invitation to celebrate the uniqueness of each individual, as well as the cultural differences that enrich us all. In this course, I will do my best to ensure that students from all backgrounds and perspectives will be served equitably. The diversity that students bring to this class will be viewed as a resource, strength and benefit. It is my intent to present materials and activities that are respectful and inclusive of the many identities of students in terms of gender, sexual orientation, disability, age, socioeconomic status, ethnicity, race, culture, perspective, and other background characteristics. Your suggestions about how to improve the value of diversity and inclusiveness in this course are encouraged and appreciated.

Preferred Pronouns

Students are asked to indicate their preferred pronouns by updating their profile in Canvas. The use of preferred pronouns is important to show respect for students' gender identities, and to recognize and validate students' right to choose their own names and forms of address. Please use preferred pronouns that other students display in oral and written comments to them during class discussions.

Reporting a Bias Incident or Sexual Misconduct

In any case of possible bias or sexual misconduct, either in the classroom or anywhere on campus, you are encouraged to file a report online (Search: Siena College Bias Report) or in person with Lois Goland, Sienas Title IX/Title VII Officer, SSU 235, 518-782-6673, Any Siena community member, who experiences or observes an incident of bias or misconduct, including faculty, staff and students, can file a report through this system. More information and resources around procedures dealing with sexual misconduct and discrimination and harassment are available online.

Emergency Preparedness

Take your text and a copy of the syllabus home with you along with your electronic devices in the event of a college closure. Continue with readings and assignments according to the course schedule; some assignments may be posted on Canvas or sent to you via e-mail. Check your email and Canvas pages for instructions about course delivery, for example, whether the course will be resumed online. If possible, online office hours will be established. Information regarding the status of the Colleges status and 5 reopening schedule may be monitored on the Siena website,