Data Structures And Program Design Using C

Author:  D. MalhotraN. Malhotra
Publisher: Mercury Learning & Information
Pages: 450
ISBN: 978-1683922070
Print: 1683922077
Kindle: B07FKR6LSQ
Audience: CS Students
Rating: 3
Reviewer: Harry Fairhead

Data stuctures and program design in C isn't a silly choice, but surely Java or a higher-level language would be better?

C is a low-level language and it isn't the one you first think of for a course on data structures, and certainly not for modern program design. The reason is very simple - it isn't object-oriented and today's world mostly is. However, don't write the idea off just yet because C is a simple language that forces you to confront the low-level realities. You don't just magic up a stack class and then inherit it into a queue and so on; you have to think about algorithms. This also is true as far as program design goes; forget objects, focus on the organization of the code. It still is a bit old-fashioned and you will have to learn more modern ways of doing things - unless you plan to spend your whole career writing C and ignoring broader theories of programming.

Old-fashioned is what describes this book best. It is an old-fashioned approach to C, data structures and program design. There are plenty of other books on this topic and there is an almost standard pattern for what is in each chapter, simply because this is what goes into an undergrad course on the topic. This is no bad thing if you are giving or taking such a course, but if you want to be an exceptional programmer you are going to have to do better than this.

Banner

Chapter 1 is a very general introduction to data structures and covers all of the standard forms without troubling you with code.

Chapter 2 moves on to the C language and provides a very short and elementary introduction. It covers the control structures, functions and pointers. It also introduces recursion - why if this is aimed at beginners? All very low-level and suitable for the beginner, but there is no hint as to how to run a C program or what compiler to use. In fact, there is no indication as to what version of C is being used. From the fact that the for loops all have their index variable declared outside of the loop, and functions being declared void, I'd guess it was C86, aka ANSI C.

Chapter 3 is where the data structures part of the book gets started and it is, predictably and reliably, on arrays. From here the pattern of the book follows most courses on data structures - Linked lists, Queues, Searching and Sorting, Stacks, Trees, B Trees, Hashing, Files and Graphs. Personally I'd prefer Stacks to come before Queues as they are basically related and a stack has one entry/exit point and a queue has two.

Each chapter explains the basics of the data structure, provides examples in an attempt to explain why it is needed and how it is typically used. C programs are provided in most of the chapters, but not all. For example, the chapter on files raises the question of which operating system and which file system? Actually the book avoids the question entirely by simply explaining the ideas behind sequential files, and indexed sequential and so on. No file system is ever mentioned. The same is the case for the chapter on graphs where graphs are defined and then algorithms given in pseudo code.  

 

 

This is a course textbook. It goes over the standard things that need to be in a data structures 101 course and just happens to use C as its language for the examples. What I found most strange about it is that it seems to believe that real computers don't exist. There is no mention of how to run a C program, what you should use to create such a program or what compiling, linking and debugging are about. There is certainly no mention of any particular operating systems and this is particularly apparent in the chapter on Files where you might have expected some examples using the C file functions, with perhaps some Linux file handling thrown in. There is also no mention of anything even slightly modern. For example in relation to files there is no mention of streams, or OS-specific things like file descriptors and no discussion of practical things like stdin and stdout and certainly no mention of exciting things such as the web.

Another minor problem is that the book doesn't really cover program design. Even without object-oriented ideas there is still room for some discussion of top down modular programming. The program design part of the book's title really isn't justified.

If you want a book that is in a bit of a time warp due to its focus on covering a data structures 101 type syllabus from a few years ago then this might be what you are looking for. If you want something to inspire you, or teach you modern C or program design, then you need another book.

 

To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.

Banner


Seven Concurrency Models in Seven Weeks

Author:  Paul Butcher 
Publisher: Pragmatic Programmers
Pages: 300
ISBN: 978-1937785659
Print:1937785653
Kindle:B00MH6EMN6
Audience: Experienced programmers
Rating: 4.5
Reviewer: Mike James

The subtitle tells it all "When Threads Unravel".



Beginning Arduino 2nd Ed

Author: Michael McRoberts
Publisher: Apress, 2013
Pages: 424 
ISBN: 978-1430250166
Print: 143025016X
Kindle: B00FJUH0MW
Aimed at: Arduino beginners
Rating: 4.5
Reviewer: Harry Fairhead

A beginners guide to the Arduino - but what sort of beginners? Beginning programmers? Beginning hardware experts [ ... ]


More Reviews

Last Updated ( Tuesday, 18 September 2018 )