COMP2521 COMP2521 Final Exam

C Programming Reference

There are two sources of information that you can use for the C programming language.

The first is a C language quick reference (in PDF) which gives an overview of the language. To open this quick reference, select "C Reference Card" in the menu under the left mouse button.

The second reference source is the Unix Programmers' Manual, available via the man command. The most useful material will probably be the library function reference, available in section 3 of the manual. To access the manual entry for a particular function, e.g. strlen, use the command:

man 3 strlen

If you can't remember the name of the function you want, use the apropos command to get a list of suggestions. To use apropos, simply give a keyword that describes some aspect of the function. Imagine that you've forgotten the name of the strlen function, but you know there's a function compute the length of a string. Try the following command:

apropos length

The apropos command typically gives too many suggestions, but you can usually find what you want somewhere in the list.