April 5, 2000

DevX - Software Development Resource

Don’t Forget the Null

A valid C string consists of an array of zero or more characters plus an additional null character. Thus, the shortest possible string must contain at least one character. Remember

DevX - Software Development Resource

The Prototype of Main()

In pre-standard C++, the prototype of main() didn’t have a return value. On some compilers, it was: main() /* no explicit return value; int assumed*/ While others used one of

DevX - Software Development Resource

Remove “Dead Declaration” From Your Code

Applications constantly undergo modifications, bug fixes, and customization. Programmers often remove pieces of obsolete code that use a variable while leaving the declaration of that variable intact. A clever compiler

DevX - Software Development Resource

Tackling a Common Bug With scanf()

In legacy code and environments that support C exclusively, using scanf() is still a widespread method of getting input from a user (or a file, when using fscanf()). When using

DevX - Software Development Resource

Is Learning C a Waste of Time?

One of the frequently asked questions I receive is: “I’m learning C at school/college/from a book. Am I wasting my time learning this language? Should I be learning C++ instead?”