Beginning C Programming for Engineers

This course (CSCI-1190) will teach some of the rudiments of computer programming and some of the essentials of the C programming language. Note that students taking CS-1 cannot also take this course for credit.

This course is highly interactive. It is taught in a laboratory setting. Students will receive some instruction, then given problems to be programmed in class. The instructor and lab TAs will assist students as they work. Homework, a project, and a final exam will also be given.

Submitting Work by Email

Vi Nguyen is the grader for section 2 (Mon).  His email address is nguyev@rpi.edu.
Patrick Willett is the grader for section 4 (Wed).  His email address is willep@rpi.edu.

YOUR HOMEWORK OR PROJECT MUST BE SUBMITTED ELECTRONICALLY.

As an example, suppose now you have finished homework 1.  You should have four source files, rcsid-1-1-1.c,
rcsid-1-1-2.c, rcsid-1-2.c, rcsid-1-3.c.

For UNIX users:

1. Collect the program listing.

    $script outfile
    bash$ cat rcsid-1-1-1.c
    [Text of the program is printed out here.]
    bash$ gcc -Wall -o rcsid-1-1-1 rcsid-1-1-1.c
    bash$ rcsid-1-1-1
    [Results of running the program are printed out here.]
    Bash$ [continuing for rcsid-1-1-2.c, rcsid-1-2.c, rcsid-1-3.c]
    [...]
    bash$ exit

2. Now you have a program listing named outfile.  Unfortunately, this file contains everything you've input from the keyboard, including many non-printing characters, like backspaces, tabs, which make it unreadable.  To remove these non-printing characters, you must execute the following command.

    $ col -b  < outfile   > hw1

3. The col command reads outfile and creates a new file named hw1, which is a cleaner version of outfile.  To submit this file, first open it with nedit.

    $ nedit hw1

    Make sure it doesn't contain any special characters.  Click on the menu Edit -> Select All (the shortcut is Ctrl+A) to select the entire content of the file.  Copy it to the clipboard by clicking on the menu Edit -> Copy (or Ctrl+C).

4. Open a netscape window.  Log in to webmail.rpi.edu.  Enter the email composing interface.

For Cygwin Users

Unfortunately, Cygwin doesn't come with a 'script' command, so the homework must be submitted differently.  The idea is to copy and paste everything from the screen to the email message body.  And you don't need to put your source files in the message body. Open a netscape window and go to Webmail@RPI as described by the instructions for UNIX users.
 

    $ [ No need to display the content of the source file ]
    $ gcc -Wall -o rcsid-1-1-1 rcsid-1-1-1.c
    $ rcsid-1-1-1
    [ Results of running the program are printed out here.]
    [ Copy and paste the screen output to the composing window of Webmail@RPI.  To copy in the dos prompt window, first click on the 'mark' buttion on the toolbar, make the selection using mouse and then click on the 'copy' button on the toolbar. ]
    $ [repeat for rcsid-1-1-2.c, rcsid-1-2.c, rcsid-1-3.c]
    [...]
    $

    The rest would be the same as the instruction 4 for UNIX users.

Follow the above instructions carefully.  If you have any questions please email me or stop by my office.

Handouts

Course notes