REVIEW - C Programming for the Absolute Beginner - The Fun Way to Learn Programming


Title:

C Programming for the Absolute Beginner

The Fun Way to Learn Programming

Author:

Michael A. Vine

ISBN:

Publisher:

Course Technology (2002)

Pages:

240pp

Reviewer:

Thomas Padron-McCarthy

Reviewed:

February 2005

Rating:

★★☆☆☆


This could have been a good introduction to C, but it contains many mistakes both concerning how the C language works and concerning terminology. In addition, many of the explanations are more confusing than illuminating, when they are not simply wrong.

The book starts with a short introduction on how to use Unix, and there is an appendix on how to install Cygwin to get your Windows computer to behave like Unix and to get access to the free Gnu C compiler gcc. That is only in the introduction, and in the rest of the book, the C code is not operating system specific. All examples are shown in the standard Windows command prompt.

The book matches the content of a typical beginner's course on C, up to and including arrays, structures, unions, pointers, dynamic memory allocation, separate compilation and include files. Everything is explained slowly and carefully. It stays away from more advanced topics such as varargs.

Unfortunately, there are three serious problems with this book: incorrect information about C, strange terminology and confusing explanations.

To show just one instance of incorrect C, I will quote this code example from page 60:

if isdigit(cResponse)
printf("\nThank you\n");
else
printf("\nYou did not enter a digit\n");

This is the explanation that goes along with the code:

"I did not evaluate the isdigit function to anything in the preceding if condition. This means that I do not need to surround my expression in parentheses. You can do this in any if condition, as long as the expression or function returns a true or false (Boolean) value."

Besides the author seeming to think that "evaluate" means "compare", this is of course entirely wrong. The example compiles, but only because isdigit is a macro which happens to contain its own parentheses (as expression macros should).

There are more errors similar to this one. Some of them, such as the claim that it is the printf function that parses escape sequences such as \n and \", may be explained as pedagogical simplifications. In that case it is not a good idea to lie to the student about things that will cause him to make mistakes later on.

As for strange terminology, one of the worst of many examples is that the author actually confuses variables, data types and values! For example (from page 29), he defines three floating-point variables, and says that "[t]his code has three floating-point variable data types". I do not think that he actually is confused about the things themselves, so it must be a terminology problem.

Finally, as an example of confusing explanations, consider this explanation (from page 8) of the Unix file system; "As you'll see later, directories are nothing more than files that contain the hierarchical relationship needed to support its contents and relationships." Would you understand that sentence if you did not already know what a directory is? And, knowing what a directory is, can you decide if the statement in the sentence is true, false or meaningless?

I taught C programming for several years during the nineties, at the Linköping University and in industry, both introductory and advanced courses. As part of that work, I evaluated a large number of C textbooks. This is not the worst book I have seen, but it will require much work before it becomes a good one. Not recommended.


Book cover image courtesy of Open Library.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.