CS 241: Data Organization using C
Computer Science Department
University of New Mexico

Course Description
CS-241 is an introduction to the C Programming language, an introduction to using a command-line interface i n the Linux operating system, and an introduction to machine level data organization and memory allocation. Students taking this course should already be familiar with basic concepts of computer programming such as variables, conditional control flow and loops. Developing mastery of these fundamental concepts is one of the goals of CS-241. Students in CS-241 author many C programs: Lab assignments will be short and relatively simple. Projects will be more interesting and touch on a wide range of computer applications including encryption, numerical analysis, databases, artificial intelligence, genetic algorithms and games.

Many examples used in this course involve standard data structures such as linked lists and trees. However, mastery of such data structures is not within the course’s domain. The primary goals of CS-241 are for the student to be able to:

  1. Read and apply the C syntax covered in the textbook (The C Programming Language by Kernighan and Ritchie).
  2. Without a computer, determine the output of C language source code involving triply nested loops, conditional control flow, function calls, pointers, arrays, arithmetic, logical and bit operators, tructures and memory allocation.
  3. Use a Linux command-line environment to manipulate files, and directories, and to edit, compile, run and debug C programs. This includes the use of simple makefiles and a low level debugger such as valgrind.
  4. Implement, in C, any given algorithm with a complexity level equivalent to that of quicksort or a doubly linked list with accuracy, efficiently and clarity.
Prerequisite Skills
However, what you really need is:
  1. A solid grasp of basic control flow (if, else if, for, while, ... or equitant) in any programming language: Java, Matlab, Fortran, Basic, Python....
  2. A solid base in Algebra I. If solving linear equations with one or two variables on paper has you scratching your head, then you need more math before attempting this course. You can sign up, but you will just be donating tuition dollars to UNM. I have never seen anyone pass who started the course while struggling with linear equations.
The most likely path to success with the first few CS courses at UNM is: CS-105 → CS-152 → CS-251 → CS-241.


Syllabus



Week 1:
Week 2:
Week 3 & 4:
Week 5:
Week 6:
Week 7:
Week 8: (fall break Thursday and Friday)
Week 9:
Week 10:
Week 11 & 12:
Week 13:
Week 14:
Past Exams: