C Language

Advice & Warning for C Tutorials

C is a powerful programming language, but not without risks. Without help, even experienced C programmers can find themselves in trouble, despite "careful" programming, lint filters and good debuggers and managers of programming projects can discover too late that using C carelessly can lead to delayed and defect-ridden software. This tutorial helps avoid problems by illuminating the dangers of C and describing specific programming techniques to make C programming both faster and safer.

Introduction

C and C++ are widely promoted as ideal portable, fast, and - in the case of C++ - "object-oriented" languages. This characterization is deserved when C...

Common Mistakes and How to Avoid Them

Why do some programmers think C is such a hot language? It must be because it has burned them so many times. Unless you're from the "no flame,...

Foolproof Statement and Comment Syntax

C is not really a bad language; it's just too often misused. As a language for writing low-level device drivers or operating system kernels, C is...

Hassle-free Arrays and Strings

When you learn that, in C, the first element of an array is referenced as x[0], you appreciate C's reputation for being both efficient...

Simplified Variable Declarations

An object's scope is something you can't C very clearly in source code. Or should I say you can't code scope clearly in C source? If you can't quite C...

Practical Pointers

If someone had used a C compiler for a bow and C pointers for arrows, he'd have skewered Bill, Jr. - not an apple - to the tree ...

Macros and Miscellaneous Pitfalls

A bad macro can drive a good programmer mad. Imagine the frustration when an unsuspecting programmer code...

Working with C++

Why is C's successor called ?C plus-plus?? One rationale is that C++ is a ?better C? (the first ?plus?) and adds object-oriented programming (OOP)...

Managing C and C++ Development

For a programmer working on a single program, a project leader coordinating several people building a complex application, or an MIS director ...

This tutorial is unique in that it takes a critical look at C's deficiencies, but offers tried-and-proven techniques to minimize the chances that common C coding mistakes will lead to serious or hard-to-find software defects. No other tutorial on C programming combines the depth of specific technical information and the strategic assessment of C's capabilities and risks that you'll find in Common Sense C.