C ProgrammingSteve Holmes
University of Strathclyde Computer Centre
Curran Building
100 Cathedral Street
Glasgow
Please note: Steve no longer works for the University of Strathclyde, and we are unable to answer queries relating to this course. You are welcome to make links to it however, but please bear in mind that it was written for students within the University and so some parts may not be relevant to external readers.
This course was awarded a NetGuide Gold Award during the 1990s.
- Contents
- Copyright Notice and Credits
- Introduction
- About C
- C and UNIX
- This Course
- Dialects of C
- A Quick Overview of C
- A Very Simple Program
- A Weight Conversion Program
- Weight Conversion Table Using a Function
- Weight Conversion with a Prompt
- Weight Conversion with Command Line Argument
- Fibonacci Series Using an Array
- Using C with UNIX
- Writing the Program
- Compiling the Program
- The C Compiler (cc)
- Make, a Program Builder
- Improved Type Checking Using Lint
- Running the Program
- Constant and Variable Types
- Variables
- Variable Names
- Global Variables
- Static Variables
- Constants
- Arrays
- Expressions and Operators
- Assignment Statement
- Arithmetic operators
- Type conversion
- Comparison
- Logical Connectors
- Summary
- Control Statements
- The if else Statement
- The switch Statement
- Loops
- The while Loop
- The do while Loop
- The for Loop
- The break Statement
- The continue Statement
- The goto Statement
- Functions in C
- Scope of Function Variables
- Modifying Function Arguments
- Pointers in C
- Arrays and Pointers
- Recursive Functions
- Input and Output
- The Standard Input Output File
- Character Input / Output
- Formatted Input / Output
- Whole Lines of Input and Output
- Handling Files in C
- UNIX File Redirection
- C File Handling - File Pointers
- Opening a file pointer using fopen
- Standard file pointers in UNIX
- Closing a file using fclose
- Input and Output using file pointers
- Character Input and Output with Files
- Formatted Input Output with File Pointers
- Formatted Input Output with Strings
- Whole Line Input and Output using File Pointers
- Special Characters
- NULL, The Null Pointer or Character
- EOF, The End of File Marker
- Other String Handling Functions
- Conclusion
- Structures in C
- Defining a Structure
- Accessing Members of a Structure
- Structures as Function Arguments
- Further Uses of Structures
- The C Preprocessor
- Using #define to Implement Constants
- Using #define to Create Functional Macros
- Reading in Other Files using #include
- Conditional selection of code using #ifdef
- Using #ifdef for Different Computer Types
- Using #ifdef to Temporarily Remove Program Statements
- Programs with Several Files
- Advantages of Using Several Files
- How to Divide a Program between Several Files
- Organisation of Data in each File
- Compiling Multi-File Programs
- Using make with Multi-File Programs
- UNIX Library Functions
- Finding Information about Library Functions
- Use of Library Functions
- Some Useful Library Functions
- Precedence of C operators
- Special Characters
- Formatted Input and Output Function Types
- Some Recommended Books
- C Language Keywords
- Usable SUN Systems
- About this document ...
本帖隐藏的内容
http://www2.its.strath.ac.uk/courses/c/