Object-Oriented Programming with ANSI-C uses ANSI-C to
discover how object-oriented programming is done, what its techniques
are, why they help us solve bigger problems, and how we harness
generality and program to catch mistakes earlier.
Chapters include:
Abstract Data Types
Dynamic Linkage:
Programming Savvy - Write a small program to read and
evaluate arithmetic expressions consisting of floating point numbers,
parentheses and the usual operators for addition, subtraction, and so
on
Inheritance - Code Reuse and Refinement
Programming Savvy - Symbol Table
Class Hierachy
The ooc Preprocessor - looks at the design of a
preprocessor ooc which helps readers to stick to programming conventions
Dynamic Type Checking - Defensive Programming
Static Construction - Self-Organization
Delegates
Class Methods - Plugging Memory Leaks
Persistent Objects - Storing and Loading Data
Structures
Exceptions - Disciplined Error Recovery
Forwarding Messages - Looks at a rather typical
problem: one object hierarchy we build ourselves to create an
application, and another object hierarchy is more or less imposed upon
us, because it deals with system facilities such as a graphical user
interface (GUI, the pronunciation indicates the generally charming
qualities).
Advocating a style of C programming based upon data
abstraction (classes) and run-time object verification, Writing
Bug-Free C Code
describes a technique that results in virtually bug-free code from the
beginning. It details the key to writing bug-free code; the class
methodology; designing modules; general tips; and a style guide. It is
designed for C programmers interested in writing bug-free code.
The class methodology helps to prevent bugs by making it
easier to write C code. It does this by eliminating data structures
(class declarations) from include files, which makes a project easier
to understand (because there is not as much global information), which
makes it easier to write C code, which helps to eliminate bugs. This
class methodology, which uses private class declarations, is different
from C++, which uses public class declarations.
The class methodology helps detect bugs by providing for
both compile-
time and run-time type checking of pointers (handles) to class objects.
This run-time type checking catches a lot of bugs for you since invalid
object handles (the cause of a lot of bugs) are automatically detected
and reported.
In the end, this book is all about the techniques used to write
virtually bug-free code.
HTML (single page), HTML (All on one page), PDF,
PostScript
Pages
130
Beej's Guide to C Programming tries to lead the reader
from complete and utter sheer lost confusion on to the sort of
enlightened
bliss that can only be obtained though pure C programming.
Chapters:
Programming Building Blocks
Variables, Expressions, and Statements - A
variable is simply a name for a number. An expression in C consists of
other expressions optionally put together with operators. Examines the
if, while, do-while, and the for statements
Building Blocks Revisited
Functions - put some of those building blocks in
their own functions when they become too large, or when they do a
different thing than the rest of the code
Variables, the Sequel - talks about variable scope
and storage classes
Pointers - they are the address of data. Just like an
int can be 12, a pointer can be the address of data
Structures - a construct that allows you to
logically group variables into groups. You can then reference the group
as a whole
Arrays - a linear collection of related data
Strings - a string in C is a sequence of bytes in
memory that usually contains a bunch of letters
Dynamic Memory - explores the malloc(),
free(), realloc(), and calloc() functions
More Stuff - topics include pointer arithmetic,
typedef, enum, struct declarations, command line arguments,
multidimensional arrays, casting and promotion, incomplete types, void
pointers, NULL pointers, and static keywords
Standard I/O Library - used for reading from
and writing to files
String Manipulation - find functions for
pulling substrings out of strings, concatenating strings together,
getting the length of a string, and more
Mathematics - functions that will serve your
general purpose mathematical needs
This book is licensed under the Creative Commons
Attribution-Noncommercial- No Derivative Works 3.0 License.