Book description
C is one of the most popular programming languages. It runs on most software platforms and computer architecture. This revised edition of our best-selling text Programming in C not only maintains the exclusivity of previous editions but also enhances it with the addition of new programs and illustrations. Challenging concepts are supported with numerous solved and unsolved programs. The new chapter on computer graphics ensures that this book comprehensively covers the syllabi of most universities. The book also uses the Turbo C compiler, which is the most widely used C compiler. With its increased coverage and inclusion of new learning tools, this edition is an invaluable asset for students who aim to improve their programming skills.
Table of contents
- Cover
- Title page
- Contents
- About the Authors
- Dedication
- Preface
-
1 Basics and introduction to C
- 1.1 Why to Use Computers?
- 1.2 Basics of a Computer
- 1.3 Latest Computers
- 1.4 Introduction to C
- 1.5 About ANSI C Standard
- 1.6 Machine, Assembly and High-Level Language
- 1.7 Assembler, Compiler and Interpreter
- 1.8 Structure of a C Program
- 1.9 Programming Rules
- 1.10 Executing the C Program
- 1.11 Standard Directories
- 1.12 The First C Program
- 1.13 Advantages of C
- 1.14 Header Files
- 1.15 Algorithm
- 1.16 Classification of Algorithms
- 1.17 Flow charts
- 1.18 Pseudocode
- Summary
- Exercises
-
2 The C Declarations
- 2.1 Introduction
- 2.2 The C Character Set
- 2.3 Delimiters
- 2.4 Types of Tokens
- 2.5 The C Keywords
- 2.6 Identifiers
- 2.7 Constants
- 2.8 Variables
- 2.9 Rules for Defining Variables
- 2.10 Data Types
- 2.11 C Data Types
- 2.12 Integer and Float Number Representations
- 2.13 Declaring Variables
- 2.14 Initializing Variables
- 2.15 Dynamic Initialization
- 2.16 Type Modifiers
- 2.17 Type Conversion
- 2.18 Wrapping Around
- 2.19 Constant and Volatile Variables
- Summary
- Exercises
- 3 Operators and Expressions
- 4 Input and Output in C
-
5 Decision Statements
- 5.1 Introduction
- 5.2 The if Statement
- 5.3 The if-else Statement
- 5.4 Nested if-else Statements
- 5.5 The if-else-if Ladder Statement
- 5.6 The break Statement
- 5.7 The continue Statement
- 5.8 The goto Statement
- 5.9 The switch Statement
- 5.10 Nested switch case
- 5.11 The switch case and nested ifs
- Summary
- Exercises
- 6 Loop Control
-
7 Data Structure: Array
- 7.1 Introduction
- 7.2 Array Declaration
- 7.3 Array Initialization
- 7.4 Array Terminology
- 7.5 Characteristics of an Array
- 7.6 One-Dimensional Array
- 7.7 One-Dimensional Array and Operations
- 7.8 Operations with Arrays
- 7.9 Predefined Streams
- 7.10 Two-Dimensional Array and Operations
- 7.11 Three- or Multi-Dimensional Arrays
- 7.12 The sscanf() and sprintf() Functions
- 7.13 Drawbacks of Linear Arrays
- Summary
- Exercises
- 8 Strings and Standard Functions
-
9 Pointers
- 9.1 Introduction
- 9.2 Features of Pointers
- 9.3 Pointers and Address
- 9.4 Pointer Declaration
- 9.5 The Void Pointers
- 9.6 Wild Pointers
- 9.7 Constant Pointers
- 9.8 Arithmetic Operations with Pointers
- 9.9 Pointers and Arrays
- 9.10 Pointers and Two-Dimensional Arrays
- 9.11 Pointers and Multi-Dimensional Arrays
- 9.12 Array of Pointers
- 9.13 Pointers to Pointers
- 9.14 Pointers and Strings
- Summary
- Exercises
-
10 Functions
- 10.1 Introduction
- 10.2 Basics of a Function
- 10.3 Function Definition
- 10.4 The return Statement
- 10.5 Types of Functions
- 10.6 Call by Value and Reference
- 10.7 Function Returning More Values
- 10.8 Function as an Argument
- 10.9 Function with Operators
- 10.10 Function and Decision Statements
- 10.11 Function and Loop Statements
- 10.12 Functions with Arrays and Pointers
- 10.13 Passing Array to a Function
- 10.14 Nested Functions
- 10.15 Recursion
- 10.16 Types of Recursion
- 10.17 Rules for Recursive Function
- 10.18 Direct Recursion
- 10.19 Indirect Recursion
- 10.20 Recursion Versus Iterations
- 10.21 The Towers of Hanoi
- 10.22 Advantages and Disadvantages of Recursion
- 10.23 Efficiency of Recursion
- 10.24 Library Functions
- Summary
- Exercises
- 11 Storage Classes
-
12 Preprocessor directives
- 12.1 Introduction
- 12.2 The #define Directive
- 12.3 Undefining a Macro
- 12.4 Token Pasting and Stringizing Operators
- 12.5 The #include Directive
- 12.6 Conditional Compilation
- 12.7 The #ifndef Directive
- 12.8 The #error Directive
- 12.9 The #line Directive
- 12.10 The #pragma inline Directive
- 12.11 The #pragma saveregs
- 12.12 The #pragma Directive
- 12.13 The Predefined Macros in ANSI and TURBO-C
- 12.14 Standard I/O Predefined Streams in stdio.h
- 12.15 The Predefined Marcos in ctype.h
- 12.16 Assertions
- Summary
- Exercises
-
13 Structure and Union
- 13.1 Introduction
- 13.2 Features of Structures
- 13.3 Declaration and Initialization of Structures
- 13.4 Structure within Structure
- 13.5 Array of Structures
- 13.6 Pointer to Structure
- 13.7 Structure and Functions
- 13.8 typedef
- 13.9 Bit Fields
- 13.10 Enumerated Data Type
- 13.11 Union
- 13.12 Calling BIOS and DOS Services
- 13.13 Union of Structures
- Summary
- Exercises
-
14 Files
- 14.1 Introduction of a File
- 14.2 Definition of File
- 14.3 Streams and File Types
- 14.5 File I/O
- 14.6 Structures Read and Write
- 14.7 Other File Function
- 14.8 Searching Errors in Reading/Writing Files
- 14.9 Low-Level Disk I/O
- 14.10 Command Line Arguments
- 14.11 Application of Command Line Arguments
- 14.12 Environment Variables
- 14.13 I/O Redirection
- Summary
- Exercises
- 15 Graphics
-
16 Dynamic Memory Allocation and Linked List
- 16.1 Dynamic Memory Allocation
- 16.2 Memory Models
- 16.3 Memory Allocation Functions
- 16.4 List
- 16.5 Traversal of a List
- 16.6 Searching and Retrieving an Element
- 16.7 Predecessor and Successor
- 16.8 Insertion
- 16.9 Linked Lists
- 16.10 Linked List with and without Header
- 16.10.1 Linked List with Header
- Summary
- Exercises
- Appendix A
- Appendix B
- Appendix C
- Appendix D
- Appendix E
- Acknowledgements
- Copyright
- Back Cover
Product information
- Title: Programming in C, 3/e, 3rd Edition
- Author(s):
- Release date: April 2015
- Publisher(s): Pearson Education India
- ISBN: 9789332558328
You might also like
book
Programming in C, 2nd Edition
Programming in C draws upon the exclusivity of the bestselling Programming in ANSI and Turbo C …
book
Programming in C, Third Edition
Learn the C programming language from one of the best. Stephen Kochan's Programming in C is …
book
Practical C Programming, 3rd Edition
There are lots of introductory C books, but this is the first one that has the …
book
C Programming Absolute Beginner’s Guide, Third Edition
Updated for C11 Write powerful C programs… without becoming a technical expert! This book is the …