NENG/TENH 202 Introduction to Computer Programming for Engineers

Spring 2014





Prof. Xue


Instructor:      Prof. Y. Alex Xue

Office: CESTM B230C   Phone: (518) 956-7220   Email:


Meeting Time and Location:
TuTh 8:45-10:05 AM NFE Computer Classroom

Office Hour: Thursday 3:00-4:00 PM Or by email appointment.

Teaching Assistant/Help:

  • Mr. Chris Stiles has kindly agreed to serve as a part-time teaching assistant ( )

Course Description:

This course introduces the fundamental programming concepts based on the C programming language and prepare you for courses that assume backgrounds in computer programming. Topics include variables, data types, functions, control statements, pointers, and arrays, declarations, and program designs and organizations. You need access to any programming environment that allows you to write, edit, compile, link, and debug a C program. Familiarity with fundamental programming concepts such as variables, data types, and compiling source code is helpful.

 Satisfactory completion of NSCI/NENG 110 and NSCI/NENG 120.

Programming Tools: We'll be utilizing the programming environment comprised of cgywin (online documentation), gcc (online documentation) and notepad++ (website).  

Course Text
The required text is C Programming: A Modern Approach (2nd edition) (<-- clicking on the title leads you to the book website) by K.N. King. Another useful and the traditional standard book is K&R, The C Programming Language, 2nd edition. You can find additional informations on the K&R website here.  

Two other popular books on C programming are those by Stephen Prata (C Primer Plus) and Stephen Kochan (Programming in C). The standard text on scientific computing using C is Numerical Recipe in C: The Art of Scientific Computing.

Grades and Assignments:  Grades are based on four programming assignments (15% each) and one final written exam (40%). Programming assignments are collected at the due date. Late return will not be accepted, as you'll receive full credit for submitting the assignment in time.


Course Website
Lecture notes and additional teaching materials including links to online resources will be posted at the course website. Additional information on C programming can also be found at the google group comp.lang.c


Weekly Course Materials:

  Weeks                           Lecture Topic                                                      Lecture Materials                                    Assignments           

 Week 1

  Course introduction; Introducing C;
  Ten reasons to learn C programming
 King Ch. 1, Ch.2.1 Week-1.pdf

 Week 2

  How Computers Store Numbers;
  C Fundamentals; Unix/Linux Tutorials
 King Ch.2 Week-2.pdf

 Week 3
  Formatted Input/Output;
 King Ch.3  Week-3.pdf
 Week 4
  Arithemetic and Assignment Operators; Expression Evaluation;
 King Ch.4 Week-4.pdf
 Week 5
  Logical Expressions;
 King Ch.5.1 Week-5.pdf  Assignment 1
Due 2/20 5PM

King Ch.3 Programming Projects 6 addfrac.c ; Ch.4 Programming Projects 5 upc.c

 Week 6
  Selection Statements;
 King Ch.5.2-5.3 Week-6.pdf

 Week 7
  Loop (Iteration) Statements;
 King Ch. 6  Week-7.pdf

 Week 8
  Basic Data Types;
 King Ch.7 Week-8.pdf
 Assignment 2
Due 3/15 5PM
King Ch.5 Programming Project 9 compare_dates.c;
Ch.6 Programming Project 10 compare_dates_p6.c;
Honor Students should also complete Ch.6  Programming Project 11
 Week 9
  Spring Break (No Class)

 Week 10
  One-Dimensional and Multi-
  dimensional Arrays;
 King Ch.8.1-8.2  Week-10.pdf

 Week 11
  Defining and Calling Functions; 
  Preprocessor Macros;
 King Ch.9.1-Ch.9.2 and Ch. 14.1-Ch.14.3

Week 12


Function Argument, Return and Termination; Recursive Function;

King Ch.9.3-Ch.9.6

Assignment 3
Due 4/11 5PM
King Ch.7 Programming Project 12 evaluate.c; Ch.8 Programming Project 14; reverse_sentence.c
Honor Students should also complete Ch.8 Programming Project 16 anagram.c

Week 13


The Quicksort Algorithm; Local and External Variables;
King Ch. 9.6, Ch.10.1-10.2 Week-13.pdf

Week 14

Pointers and Pointer Arithmetic;
Tutorial on Pointers and Arrays in C
King Ch. 11 and Ch 12.1

Week 15

Pointers and Arrays; String Lierals and Varaibles  Week-15.pdf

King Ch. 12.2-Ch.12.4
King Ch. 13.1-13.2

Week 16


Reading and Writing Strings; String Idioms; C String Library;  Week-16.pdf

Q&A Session

King Ch. 13.3-13.6

Assignment 4
Due 5/08 5PM
King Ch.12 Programming Project 6; qsort.c Ch.13 Programming Project 12; my_reverse_sentence_p13.c
Honor Students should also complete Ch.13 Programming Project 14  anagram_p13.c

Final Exam 05/13
NFE 4337 3:30-5:30PM