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 structures 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


Python Programming with Design Patterns

Author: James W. Cooper
Publisher: Addison-Wesley
Date: February 2022
Pages: 352
ISBN: 978-0137579938
Print: 0137579934
Kindle: B09D2RKQB5
Audience: Python developers
Rating: 1
Reviewer: Mike James
There was a time that design patterns were all the thing. Not so much now. But Python - does it have [ ... ]



Expert Performance Indexing in Azure SQL and SQL Server 2022

Author: Edward Pollack & Jason Strate
Publisher: Apress
Pages: 659
ISBN: 9781484292143
Print: 1484292146
Kindle: B0BSWH65ST
Audience: DBAs & SQL devs
Rating: 4 or 1 (see review)
Reviewer: Ian Stirk 

This book discusses indexes, a primary means of improving performance in SQL Server, how does  [ ... ]


More Reviews

Last Updated ( Tuesday, 01 September 2020 )