C Programming
Project: Due 1:30PM 28 November 2005
- The project requirements are available
- I have written a better menu template
- How to find the smallest number? Have a look.
Assignment: due 1:40pm, Tuesday 31 October 2005
- The assignment specification is here.
- You also need to submit the two programs under the topic arrays and strings in the lecture notes.
- Submit by email to nicku@nicku.org
- I will answer (nearly!) all questions you send by email.
- Failure to submit this assigment will carry a high risk of failure of the subject.
String Assignment
- I have typed in the assignment here
- Due 31 October 2005
- I will answer (nearly!) all questions you send by email.
- You risk failing the subject if you do not hand in a complete solution to this exercise.
Bitwise Assignment
- I have typed in the assignment here
- Due Monday 7 November 2005, 1.30PM.
- I will answer (nearly!) all questions you send by email.
- You risk failing the subject if you do not hand in a complete solution to this exercise.
Workshop Notes
Lecture notes I have written that you may find useful
- Review of C: presentation slides, handout for printing
- Portability and Security: presentation slides, handout for printing
- The source to the lectures, diagrams are here.
Getting TC Lite [sic] to work
The following assumes that you are logged on with Administrator privileges. Since that is the (amazingly insecure) default with Microsoft, you may assume that this is the case if you do not know otherwise.- Determine what drive you want to install onto -- you can look in Windows Explorer to find this out. Let us assume for this example that you want to install on the C: drive.
- Put the floppy disk into your computer
- Open a Command Prompt window by choosing Start --> All Programs --> Accessories --> Command Prompt
- In the command prompt, type:
a: cd tclite_zip install c:
Note that if you want to install onto another drive, such as D:, then you would typeinstall d:
instead ofinstall c:
To add C:\TCLITE\BIN to your PATH environment variable: Windows XP, Windows 2000
- Start --> right click on "My Computer" --> select "Properties" from the menu --> click on "Advanced" tab --> "Environment Variables" tab near the bottom --> click on "Path" in the "System Variables" window panel near the bottom -> click on the "Edit" button.
- VERY IMPORTANT: Press the "End" key on your keyboard to go to the end of what is already on your PATH. Do not delete the existing content of your PATH variable. If you accidentally do so, click "Cancel", and press "Edit" again.
- Add the following at the end of what is already the value of the
PATH variable:
;C:\TCLITE\BIN
For example, after I have done that, my PATH variable looks something like this:%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\TCLITE\BIN
- Click all the "OK" buttons to close all the windows that you have opened.
To add C:\TCLITE\BIN to your PATH environment variable: Windows 9x, Windows ME
- Edit C:\autoexec.bat; create it if it does not exist, using a text editor such as notepad, wordpad, edit, ...
- Put into the file C:\autoexec.bat the following:
set PATH=%PATH%;C:\TCLITE\BIN
- Save the file
- Make sure that it was saved as C:\autoexec.bat and not C:\autoexec.bat.txt This is a little bit tricky, as Microsoft software is so user friendly that it protects you from knowing what you are doing :-)
To start TCLITE:
- Open a command prompt, as above
- Type
TC
To tell TCLITE where the libraries and include files are:
- Start TCLITE
- Select Options --> Directories
- In the dialog box, enter the full path name for the Include
directory and the Library directory. On my machine, that would be:
C:\TCLITE\INCLUDE
andC:\TCLITE\LIB
Note that previously there was no drive letter. You need the drive letter there. - select "OK" or whatever options save the values you have just entered.
To run in full screen mode
- press these two keys on your keyboard at the same time: Control-Enter.
To make an icon on your desktop:
- Open Windows Explorer
- Browse to the C:\TCLITE\BIN directory.
- Right-click on the TC icon
- Select "Send to..." --> "Desktop (make shortcut)"
Useful resources
Thanks to Peter Bishop, who sent me these links in an email:- Free Compilers and Documentation
- Some free books on C
- More free books on C
- The Dev-C++ compiler can be freely downloaded from here.
- Please note that the free Borland 5.5 command line compiler is available here. After installing it, put a little configuration file into the Bin directory. This configuration file would go into C:\Borland\BCC32\Bin. Email me any questions.
- Essays and Tutorials on C
- Marshall Cline's "C++ FAQ Lite" Err, I think Marshall means "light".
- Student Assessment Guide: HTML version, PDF version, Complete with an excruciatingly annoying delay as it slowly paints "2005" on each page