The book starts with an introduction to programming in general followed by a detailed introduction to C programming. It then delves into a complete analysis of various constructs of C such as decision control and looping statements, functions, arrays, strings, pointers, structure and union, file management, and pre-processor directives. It also provides a separate chapter on linked list detailing the various kinds of linked lists and how they are used to allocate memory dynamically. A highly detailed pedagogical approach is followed throughout the book, which includes plenty of examples, figures, programming tips, keywords, and end-chapter exercises. These features should render the book an ideal resource for students to master and fine-tune the art of writing C programs.
Reema Thareja is Assistant Professor at the Department of Computer Science, Shyama Prasad Mukherjee College for Women, Univesity of Delhi. She has completed MCA (Software Engineering) and MPhil (Computer Science). She specializes in programming languages, OS, DBMS, multimedia, and web technologies and is currently pursuing research in the area of improving data warehouse quality.
1. Introduction to Programming ; 1.1 Introduction to Computer Software ; 1.2 Classification of Computer Software ; 1.3 Programming Languages ; 1.4 Generation of Programming Languages ; 1.5 Categorization of High Level Languages ; 2. Introduction to C ; 2.1 Introduction ; 2.2 Structure of a C Program ; 2.3 Writing the First C Program? ; 2.4 Files Used in a C Program ; 2.5 Compiling and Executing C Programs ; 2.6 Using Comments ; 2.7 Keywords ; 2.8 Identifiers ; 2.9 Basic Data Types in C ; 2.10 Variables ; 2.11 Constants ; 2.12 Input/output Statement in C ; 2.13 Operators in C ; 2.14 Programming Examples ; 2.15 Type Conversion and Typecasting ; Annexure ; 3. Decision Control and Looping Statements ; 3.1 Introduction to Decision Control Statements ; 3.2 Conditional Branching Statements ; 3.3 Iterative Statements ; 3.4 Nested Loops ; 3.5 The Break and Continue Statement ; 3.6 Goto Statement ; 3.7 Building a Robust C Program ; Annexure 2? ; 4. Functions ; 4.1 Introduction ; 4.2 Using Functions ; 4.3 Function Declaration/Function Prototype ; 4.4 Function Definition ; 4.5 Function Call ; 4.6 Return Statement ; 4.7 Passing Parameters to the Function ; 4.8 Scope of Variables ; 4.9 Storage Classes ; 4.10 Recursive Functions ; 4.11 Types of Recursion ; 4.12 Tower of Hanoi ; 4.13 Recursion versus Iteration ; Annexure 3 ; 5. Arrays ; 5.1 Introduction ; 5.2 Declaration of Arrays ; 5.3 Accessing Array Elements ; 5.4 Storing Values in Arrays ; 5.5 Length of an Array ; 5.6 Array Operations ; 5.7 One-Dimensional Arrays for Inter-Function Communication ; 5.8 Two-Dimensional Arrays ; 5.9 Operations on Two-dimensional(2D) Arrays ; 5.10 Two-Dimensional Arrays for Inter-Function Communication ; 5.11 Multidimensional Arrays ; 5.12 Sparse Matrices ; Annexure 4 ; 6. Strings ; 6.1 Introduction ; 6.2 Suppressing Input ; 6.3 String Taxonomy ; 6.4 String Operations ; 6.5 Miscellaneous String and Character Functions ; 6.6 Array of Strings?213 ; 7. Pointers ; 7.1 Understanding the Computer's Memory ; 7.2 Introduction to Pointers ; 7.3 Declaring Pointer Variables ; 7.4 Pointer Expressions and Pointer Arithmetic ; 7.5 Null Pointers ; 7.6 Generic Pointers ; 7.7 Passing Arguments to Function Using Pointers ; 7.8 Pointers and Arrays ; 7.9 Passing an Array to a Function ; 7.10 Difference between Array Name and Pointer ; 7.11 Pointers and Strings ; 7.12 Array of Pointers ; 7.13 Pointers and 2-D Arrays ; 7.14 Pointers and 3-D Array ; 7.15 Function Pointers ; 7.16 Array of Function Pointers ; 7.17 Pointers to Pointers ; 7.18 Memory Allocation in C Programs ; 7.19 Memory Usage ; 7.20 Dynamic Memory Allocation ; 7.21 Drawback of Pointers ; Annexure 5 ; 8. Structure, Union, and Enumerated Data Types ; 8.1 Introduction ; 8.2 Nested Structures ; 8.3 Arrays of Structures ; 8.4 Structures and Functions ; 8.5 Self-referential Structures ; 8.6 Union? ; 8.7 Arrays of Union Variables ; 8.8 Unions Inside Structures ; 8.9 Enumerated Data Types ; Annexure 6 ; 9. Files ; 9.1 Introduction to Files ; 9.2 Using Files in C ; 9.3 Read Data from Files ; 9.4 Writing Data to Files ; 9.5 Detecting the End-of-File ; 9.6 Error Handling During File Operations ; 9.7 Accepting Command Line Arguments ; 9.8 Functions for Selecting a Record Randomly ; 9.9 remove ()? ; 9.10 Renaming the File ; 9.11 Creating a Temporary File ; 10. Preprocessor Directives ; 10.1 Introduction ; 10.2 Types of Preprocessor Directives ; 10.3 #define ; 10.4 #include ; 10.5 #undef ; 10.6 #line ; 10.7 Pragma Directives ; 10.8 Conditional Directives ; 10.9 The Defined Operator ; 10.10 #error Directive ; 10.11 Predefined Macro Names ; Annexure ; 11. Linked Lists ; 11.1 Introduction ; 11.2 Linked Lists versus Arrays ; 11.3 Memory Allocation and Deallocation for a Linked List ; 11.4 Different Types of Linked Lists ; 11.5 Singly Linked List ; 11.6 Circular Linked List ; 11.7 Doubly Linked List? ; 11.8 Circular Doubly Linked List ; 11.9 Header Linked List