CS 240: Programming in C -- Spring 2020

Tuesday & Thursday 11:00AM – 12:15AM, W02-0200

Welcome to the exciting world of programming in C!

This page provides information on the CS 240 course for the spring semester of 2020. Please come back regularly during and after the course to check for updates on class notes, assignment deadlines, office hours etc. Note that we will have the blackboard for online discussions and announcement.


Online Classroom:

https://umassboston.zoom.us/j/7395068587

Instrcutor:

Haoyu Wang
Email: haoyu.wang001@umb.edu
Office location: M-03-0137
Office hours: Tuesday & Thursday 10:00AM – 11:00AM; or by appointment
Responsible for email submission of hw2,hw4,hw6,hw8.

Teaching Assistant:

Yukun Zhang
Email: yukun.zhang001@umb.edu
Office location: M-03-0163
Office hours: Monday & Wednesday 02:00PM – 03:00PM
Responsible for email submission of:

hw3,hw4,hw5,hw7

Homework Grader:

Hongqin Chen
Email: hongqin.chen001@umb.edu
Responsible for email submission of:

hw2,hw4,hw6,hw8


Course Description:

C programming is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system. C is presented as both ageneral-purpose and machine-level language, mostly used for writing system programs.

Topics covered include: representation of integer and characterdata, bitwise operations, masking, memory allocation methods, pointers, dynamic data structures, file I/O,separate compilation, program development tools and use of debuggers.No courses required by the CS major, minor, or certificate may be taken pass/fail.

Textbook:

Brian Kernighan and Dennis Ritchie, The C Programming Language, 2nd Edition
Kimberly Nelson King, C Programming: A Modern Approach

Getting Ready: New

1, Setup C development on your home PC. DevelopmentSetup (Note: I will update this guide soon).
2, First week: Get an UNIX/Linux account for cs240 through this UNIX/Linux account
(Note: you need an UNIX/Linux account, if you don't already have one, and signing in with course cs240).
3, After you get an UNIX/Linux account, try to access school server users.cs.umb.edu from your home computer.
(Note: It may take 1-2 days for you to get the permission to access server. )
See AccessServer for how to access server and transfer files to server from your home machine.

Evaluation:

The total score consists of the following:

40%: Eight homework assignments, 5% each. (No lowest homework score dropping.)

60%: Three tests, 30% each for the chosen two tests.

(Highest one of the first two and the final exam.)

The total score is converted to a letter grade according to the following grades table


Syllabus


Assignments:

Homeworks (PDF) Posted on Due Date
Homework #1
Feb 03 12:15PM, Feb 11
Homework #2
Code Stub #2
Feb 11 11:00AM, Feb 25
hw2_solution
Practice Exam #1
Feb 20 practice1 code sample
Test1
test1_solution
Homework #3
Code Stub #3
Feb 20 11:00AM, Mar 10
hw3_solution
Homework #4
Code Stub #4
test files: str_hw4.txt, num_hw4.txt,comments.txt
Mar 10 11:00AM, Mar 24
hw4_solution
Homework #5
Code Stub #5
test files: str.txt, num.txt,CompleteShakespeare.txt
Mar 24 23:59, Apr 16
hw5_solution
Test2
test2 code stub
10:55 AM,14 April 12:35,14 April
test2_solution
Homework #7
No Code Stub. Just a python script for drawing
Apr 16 23:59, May 3
hw7_solution
Homework #8
code stubs
May 03 23:59, May 14
hw8_solution



Class Sessions :

Index Session Dates Topics Slides Sample Code
1 Tue, Jan 28 Introduction Slides #1 -
2 Thu, Jan 30 Get Started Slides #2 code sample #2
3 Tue, Feb 3 Variables and Constants Slides #3 code sample #3
4 Thu, Feb 6 Arrays and Control Flow Slides #4 code sample #4
5 Tue, Feb 11 Intro to GDB, Called by Value Slides #5 code sample #5
6 Thu, Feb 13 Hands-on session -- code sample #6
CompleteShakespeare.txt
7 Tue, Feb 18 putchar, getchar Slides #7 code sample #7
8 Thu, Feb 20 Bitwise Operators Slides #8 code sample #8
9 Tue, Feb 25 Scope Rules Slides #9 code sample #9
10 Thu, Feb 27 Review -- practice1 code sample
11 Tue, Mar 03 Test #1 -- --
12 Thu, Mar 05 Header Files, Macros, Static Library Slides #12 code sample #12
13 Tue, Mar 10 Introduction to Pointers Slides #13 code sample #13
14 Thu, Mar 12 Canelled due to School Closing -- --
15 Tue, Mar 17 Spring Break -- --
16 Thu, Mar 19 Spring Break -- --
17 Tue, Mar 24 FILE Pointer/Stream Slides #17 code sample #17
18 Thu, Mar 26 Recap -- --
19 Tue, Mar 31 Pointers and Arrays
Video Recording
Slides #19 code sample #19
20 Thu, Apr 2 Continued, Dynamic Linking
Video Recording
Slides #20 code sample #20
21 Tue, Apr 7 Continued, Intro to Structure
Video Recording
Slides #21 code sample #21
22 Tue, Apr 7 Continued, Intro to Structure
Video Recording
Slides #22 code sample #22
23 Tue, Apr 14 Test2 -- --
24 Thu, Apr 16 Some Utility Functions, Qsort with Structure
Video Recording (Access Password: w7&6571$)
Slides #24 code sample #24
25 Tue, Apr 21 Endianness, Uion, Bit-fields
Video Recording (Access Password: 0w$3&o#4)
Slides #25 code sample #25
26 Thu, Apr 23 Sorting of Pointer to Pointer, Test2 Solution
Video Recording ( Password: 6v%Jrj37)
-- code sample #26
28 Thu, Apr 30 Stream Buffer Mode, Errorno
Video Recording ( Password: 1x&.T?95)
Slides #28 code sample #28
29 Tue, May 5 ArrayList
Video Recording ( Password: 5h&+g95C)
Slides #29 code sample #29
30 Thu, May 7 Recap
Video Recording (Password: 8H..21l#)
Slides #30
31 Tue, May 12 Recap
Video Recording ( Password: 8C?.4N96)
-- code sample #31











Accommodations:

Section 504 of the Americans with Disabilities Act of 1990 offers guidelines for curriculum modifications and adaptations for students with documented disabilities. If applicable, students may obtain adaptation recommendations from the Ross Center for Disability Services, Campus Center, UL Room 211, (617-287-7430). The student must present these recommendations and discuss them with each professor within a reasonable period, preferably by the end of Drop/Add period.

Student Conduct:

Students are required to adhere to the University Policy on Academic Standards and Cheating, to the University Statement on Plagiarism and the Documentation of Written Work, and to the Code of Student Conduct as delineated in the catalog of Undergraduate Programs. The Code is available online at:life_on_campus/student_conduct