Introduction to C Programming
Publisher: Oxford University Press India; Oxford University Press
Published: 2014
Language: eng
Number of pages: 394
ISBN-13: 9780199452057
Subjects: C (computer program language)
Table of contents: title: Features of the Book
pagenum: iv; title: Preface to Second Edition
pagenum: vi; title: Preface to First Edition
pagenum: ix; title: Brief Contents
pagenum: x; label: 1
title: Introduction to Programming
pagenum: 1; label: 1.1
title: Introduction to Computer Software
pagenum: 1; label: 1.2
title: Classification of Computer Software
pagenum: 2; label: 1.2.1
title: System Software
pagenum: 2; label: 1.2.2
title: Application Software
pagenum: 5; label: 1.3
title: Programming Languages
pagenum: 5; label: 1.4
title: Generation of Programming Languages
pagenum: 6; label: 1.4.1
title: First Generation: Machine Language
pagenum: 6; label: 1.4.2
title: Second Generation: Assembly Language
pagenum: 7; label: 1.4.3
title: Third Generation Programming Language
pagenum: 7; label: 1.4.4
title: Fourth Generation: Very High-Level Languages
pagenum: 8; label: 1.4.5
title: Fifth Generation Programming Language
pagenum: 8; label: 1.5
title: Categorization of High Level Languages
pagenum: 9; label: 1.5.1
title: Unstructured Programming
pagenum: 9; label: 1.5.2
title: Structured Programming Language
pagenum: 9; label: 1.5.3
title: Logic-oriented Programming Language
pagenum: 11; label: 1.5.4
title: Object-Oriented Programming
pagenum: 11; label: 2
title: Introduction to C
pagenum: 15; label: 2.1
title: Introduction
pagenum: 15; label: 2.1.1
title: Background
pagenum: 15; label: 2.1.2
title: Characteristics of C
pagenum: 16; label: 2.1.3
title: Uses of C
pagenum: 17; label: 2.2
title: Structure of C Program
pagenum: 17; label: 2.3
title: Writing the First C Program
pagenum: 18; label: 2.4
title: Files Used in C Program
pagenum: 19; label: 2.4.1
title: Source Code File
pagenum: 19; label: 2.4.2
title: Header Files
pagenum: 19; label: 2.4.3
title: Object Files
pagenum: 20; label: 2.4.4
title: Binary Executable File
pagenum: 20; label: 2.5
title: Compiling and Executing C Programs
pagenum: 20; label: 2.6
title: Using Comments
pagenum: 21; label: 2.7
title: Keywords
pagenum: 22; label: 2.8
title: Identifiers
pagenum: 22; label: 2.8.1
title: Rules for Forming Identifier Names
pagenum: 22; label: 2.9
title: Basic Data Types in C
pagenum: 23; label: 2.9.1
title: How are Float and Double Stored?
pagenum: 24; label: 2.10
title: Variables
pagenum: 24; label: 2.10.1
title: Numeric Variables
pagenum: 24; label: 2.10.2
title: Character Variables
pagenum: 24; label: 2.10.3
title: Declaring Variables
pagenum: 24; label: 2.10.4
title: Initializing Variables
pagenum: 25; label: 2.11
title: Constants
pagenum: 25; label: 2.11.1
title: Integer Constant
pagenum: 25; label: 2.11.2
title: Floating Point Constant
pagenum: 26; label: 2.11.3
title: Character Constant
pagenum: 26; label: 2.11.4
title: String Constant
pagenum: 26; label: 2.11.5
title: Declaring Constants
pagenum: 26; label: 2.12
title: Input/output Statement in C
pagenum: 27; label: 2.12.1
title: Streams
pagenum: 27; label: 2.12.2
title: Formatting Input/output
pagenum: 27; label: 2.12.3
title: printf()
pagenum: 28; label: 2.12.4
title: scanf()
pagenum: 30; label: 2.12.5
title: Examples: printf/scanf
pagenum: 32; label: 2.12.6
title: Detecting Errors During Data Input
pagenum: 34; label: 2.13
title: Operators in C
pagenum: 35; label: 2.13.1
title: Arithmetic Operators
pagenum: 35; label: 2.13.2
title: Relational Operators
pagenum: 36; label: 2.13.3
title: Equality Operators
pagenum: 37; label: 2.13.4
title: Logical Operators
pagenum: 38; label: 2.13.5
title: Unary Operators
pagenum: 39; label: 2.13.6
title: Conditional Operator
pagenum: 40; label: 2.13.7
title: Bitwise Operators
pagenum: 41; label: 2.13.8
title: Assignment Operators
pagenum: 42; label: 2.13.9
title: Comma Operator
pagenum: 44; label: 2.13.10
title: Sizeof Operator
pagenum: 44; label: 2.13.11
title: Operator Precedence Chart
pagenum: 44; label: 2.14
title: Programming Examples
pagenum: 45; label: 2.15
title: Type Conversion and Typecasting
pagenum: 48; label: 2.15.1
title: Type Conversion
pagenum: 49; label: 2.15.2
title: Typecasting
pagenum: 50; title: Annexure 1
pagenum: 59; label: 3
title: Decision Control and Looping Statements
pagenum: 62; label: 3.1
title: Introduction to Decision Control Statements
pagenum: 62; label: 3.2
title: Conditional Branching Statements
pagenum: 62; label: 3.2.1
title: If Statement
pagenum: 62; label: 3.2.2
title: If-Else Statement
pagenum: 64; label: 3.2.3
title: If-Else-If Statement
pagenum: 66; label: 3.2.4
title: Switch Case
pagenum: 71; label: 3.3
title: Iterative Statements
pagenum: 75; label: 3.3.1
title: While Loop
pagenum: 75; label: 3.3.2
title: Do-while Loop
pagenum: 78; label: 3.3.3
title: for Loop
pagenum: 80; label: 3.4
title: Nested Loops
pagenum: 83; label: 3.5
title: break and continue Statements
pagenum: 93; label: 3.5.1
title: break Statement
pagenum: 93; label: 3.5.2
title: continue Statement
pagenum: 93; label: 3.6
title: goto Statement
pagenum: 95; label: 3.7
title: Building a Robust C Program
pagenum: 97; title: Annexure 2
pagenum: 107; title: Case Study for Chapters 2 and 3
pagenum: 111; label: 4
title: Functions
pagenum: 115; label: 4.1
title: Introduction
pagenum: 115; label: 4.1.1
title: Why are Functions Needed?
pagenum: 115; label: 4.2
title: Using Functions
pagenum: 116; label: 4.3
title: Function Declaration/Function Prototype
pagenum: 117; label: 4.4
title: Function Definition
pagenum: 118; label: 4.5
title: Function Call
pagenum: 118; label: 4.5.1
title: Points to Remember While Calling a Function
pagenum: 119; label: 4.6
title: Return Statement
pagenum: 120; label: 4.6.2
title: Using Variable Number of Arguments
pagenum: 121; label: 4.7
title: Passing Parameters to the Function
pagenum: 121; label: 4.7.1
title: Call by Value
pagenum: 121; label: 4.7.2
title: Call by Reference
pagenum: 122; label: 4.8
title: Scope of Variables
pagenum: 125; label: 4.8.1
title: Block Scope
pagenum: 125; label: 4.8.2
title: Function Scope
pagenum: 126; label: 4.8.3
title: Program Scope
pagenum: 126; label: 4.8.4
title: File Scope
pagenum: 127; label: 4.9
title: Storage Classes
pagenum: 127; label: 4.9.1
title: auto Storage Class
pagenum: 128; label: 4.9.2
title: register Storage Class
pagenum: 128; label: 4.9.3
title: extern Storage Class
pagenum: 129; label: 4.9.4
title: static Storage Class
pagenum: 130; label: 4.9.5
title: Comparison of Storage Classes
pagenum: 130; label: 4.10
title: Recursive Functions
pagenum: 131; label: 4.10.1
title: Greatest Common Divisor
pagenum: 132; label: 4.10.2
title: Finding Exponents
pagenum: 132; label: 4.10.3
title: Fibonacci Series
pagenum: 133; label: 4.11
title: Types of Recursion
pagenum: 134; label: 4.11.1
title: Direct Recursion
pagenum: 134; label: 4.11.2
title: Indirect Recursion
pagenum: 134; label: 4.11.3
title: Tail Recursion
pagenum: 134; label: 4.11.4
title: Linear and Tree Recursion
pagenum: 135; label: 4.12
title: Tower of Hanoi
pagenum: 136; label: 4.13
title: Recursion versus Iteration
pagenum: 137; title: Annexure 3
pagenum: 144; label: 5
title: Arrays
pagenum: 145; label: 5.1
title: Introduction
pagenum: 145; label: 5.2
title: Declaration of Arrays
pagenum: 146; label: 5.3
title: Accessing Array Elements
pagenum: 147; label: 5.3.1
title: Calculating the Address of Array Elements
pagenum: 147; label: 5.4
title: Storing Values in Arrays
pagenum: 148; label: 5.4.1
title: Initialization of Arrays
pagenum: 148; label: 5.4.2
title: Inputting Values
pagenum: 148; label: 5.4.3
title: Assigning Values
pagenum: 149; label: 5.5
title: Length of an Array
pagenum: 149; label: 5.6
title: Array Operations
pagenum: 150; label: 5.6.1
title: Traversal
pagenum: 150; label: 5.6.2
title: Insertion
pagenum: 155; label: 5.6.3
title: Deletion
pagenum: 158; label: 5.6.4
title: Merging
pagenum: 160; label: 5.6.5
title: Searching
pagenum: 162; label: 5.7
title: One-Dimensional Arrays for Inter-Function Communication
pagenum: 165; label: 5.8
title: Two-Dimensional Arrays
pagenum: 168; label: 5.8.1
title: Declaration of Two-dimensional Arrays
pagenum: 169; label: 5.8.2
title: Initialization of Two-dimensional Arrays
pagenum: 170; label: 5.8.3
title: Accessing the Elements
pagenum: 171; label: 5.9
title: Operations on Two-dimensional (2D) Arrays
pagenum: 173; label: 5.10
title: Two-Dimensional Arrays for Inter-Function Communication
pagenum: 176; label: 5.10.1
title: Passing a Row
pagenum: 176; label: 5.10.2
title: Passing an Entire 2D Array
pagenum: 176; label: 5.11
title: Multidimensional Arrays
pagenum: 178; label: 5.12
title: Sparse Matrices
pagenum: 180; title: Annexure 4
pagenum: 186; label: 6
title: Strings
pagenum: 191; label: 6.1
title: Introduction
pagenum: 191; label: 6.1.1
title: Reading Strings
pagenum: 193; label: 6.1.2
title: Writing Strings
pagenum: 193; label: 6.1.3
title: Summary of Functions Used to Read and Write Characters
pagenum: 194; label: 6.2
title: Suppressing Input
pagenum: 196; label: 6.2.1
title: Using a Scanset
pagenum: 196; label: 6.3
title: String Taxonomy
pagenum: 197; label: 6.4
title: String Operations
pagenum: 198; label: 6.4.1
title: Length
pagenum: 198; label: 6.4.2
title: Converting Characters of a String into Upper Case
pagenum: 199; label: 6.4.3
title: Converting Characters of a String into Lower Case
pagenum: 199; label: 6.4.4
title: Concatenating Two Strings to Form a New String
pagenum: 200; label: 6.4.5
title: Appending
pagenum: 201; label: 6.4.6
title: Comparing Two Strings
pagenum: 201; label: 6.4.7
title: Reversing a String
pagenum: 202; label: 6.4.8
title: Extracting a Substring from Left
pagenum: 203; label: 6.4.9
title: Extracting a Substring from Right of the String
pagenum: 203; label: 6.4.10
title: Extracting a Substring from the Middle of a String
pagenum: 204; label: 6.4.11
title: Insertion
pagenum: 205; label: 6.4.12
title: Indexing
pagenum: 205; label: 6.4.13
title: Deletion
pagenum: 206; label: 6.4.14
title: Replacement
pagenum: 207; label: 6.5
title: Miscellaneous String and Character Functions
pagenum: 207; label: 6.5.1
title: Character Manipulation Functions
pagenum: 208; label: 6.5.2
title: String Manipulation Functions
pagenum: 208; label: 6.6
title: Array of Strings
pagenum: 213; title: Annexure 5
pagenum: 265; title: Case Study for Chapters 6 and 7
pagenum: 268; label: 7
title: Pointers
pagenum: 225; label: 7.1
title: Understanding the Computer's Memory
pagenum: 225; label: 7.2
title: Introduction to Pointers
pagenum: 226; label: 7.3
title: Declaring Pointer Variables
pagenum: 227; label: 7.4
title: Pointer Expressions and Pointer Arithmetic
pagenum: 229; label: 7.5
title: Null Pointers
pagenum: 233; label: 7.6
title: Generic Pointers
pagenum: 233; label: 7.7
title: Passing Arguments to Function Using Pointers
pagenum: 234; label: 7.8
title: Pointers and Arrays
pagenum: 235; label: 7.9
title: Passing an Array to a Function
pagenum: 239; label: 7.10
title: Difference between Array Name and Pointer
pagenum: 240; label: 7.11
title: Pointers and Strings
pagenum: 241; label: 7.12
title: Array of Pointers
pagenum: 244; label: 7.13
title: Pointers and 2-D Arrays
pagenum: 246; label: 7.14
title: Pointers and 3-D Array
pagenum: 248; label: 7.15
title: Function Pointers
pagenum: 249; label: 7.15.1
title: Initializing a Function Pointer
pagenum: 249; label: 7.15.2
title: Calling a Function Using a Function Pointer
pagenum: 249; label: 7.15.3
title: Comparing Function Pointers
pagenum: 250; label: 7.15.4
title: Passing a Function Pointer as an Argument to a Function
pagenum: 250; label: 7.16
title: Array of Function Pointers
pagenum: 250; label: 7.17
title: Pointers to Pointers
pagenum: 251; label: 7.18
title: Memory Allocation in C Programs
pagenum: 252; label: 7.19
title: Memory Usage
pagenum: 252; label: 7.20
title: Dynamic Memory Allocation
pagenum: 252; label: 7.20.1
title: Memory Allocations Process
pagenum: 253; label: 7.20.2
title: Allocating a Block of Memory
pagenum: 253; label: 7.20.3
title: Releasing the Used Space
pagenum: 254; label: 7.20.4
title: To Alter the Size of Allocated Memory
pagenum: 254; label: 7.21
title: Drawbacks of Pointers
pagenum: 256; title: Annexure 6
pagenum: 299; label: 8
title: Structure, Union, and Enumerated Data Types
pagenum: 271; label: 8.1
title: Introduction
pagenum: 271; label: 8.1.1
title: Structure Declaration
pagenum: 271; label: 8.1.2
title: Typedef Declarations
pagenum: 273; label: 8.1.3
title: Initialization of Structures
pagenum: 273; label: 8.1.4
title: Accessing the Members of a Structure
pagenum: 274; label: 8.1.5
title: Copying and Comparing Structures
pagenum: 274; label: 8.2
title: Nested Structures
pagenum: 277; label: 8.3
title: Arrays of Structures
pagenum: 278; label: 8.4
title: Structures and Functions
pagenum: 280; label: 8.4.1
title: Passing Individual Members
pagenum: 280; label: 8.4.2
title: Passing the Entire Structure
pagenum: 281; label: 8.4.3
title: Passing Structures Through Pointers
pagenum: 284; label: 8.5
title: Self-referential Structures
pagenum: 288; label: 8.6
title: Union
pagenum: 289; label: 8.6.1
title: Declaring a Union
pagenum: 289; label: 8.6.2
title: Accessing a Member of a Union
pagenum: 289; label: 8.6.3
title: Initializing Unions
pagenum: 289; label: 8.7
title: Arrays of Union Variables
pagenum: 290; label: 8.8
title: Unions Inside Structures
pagenum: 290; label: 8.9
title: Enumerated Data Types
pagenum: 291; label: 8.9.1
title: Enum Variables
pagenum: 292; label: 8.9.2
title: Using the Typedef Keyword
pagenum: 292; label: 8.9.3
title: Assigning Values to Enumerated Variables
pagenum: 292; label: 8.9.4
title: Enumeration Type Conversion
pagenum: 292; label: 8.9.5
title: Comparing Enumerated Types
pagenum: 293; label: 8.9.6
title: Input/Output Operations on Enumerated Types
pagenum: 293; title: Annexure 6
pagenum: 299; label: 9
title: Files
pagenum: 301; label: 9.1
title: Introduction to Files
pagenum: 301; label: 9.1.1
title: Streams in C
pagenum: 301; label: 9.1.2
title: Buffer Associated with File Stream
pagenum: 302; label: 9.1.3
title: Types of Files
pagenum: 302; label: 9.2
title: Using Files in C
pagenum: 303; label: 9.2.1
title: Declaring a File Pointer Variable
pagenum: 303; label: 9.2.2
title: Opening a File
pagenum: 303; label: 9.2.3
title: Closing a File Using fclose()
pagenum: 305; label: 9.3
title: Read Data from Files
pagenum: 305; label: 9.3.1
title: fscanf()
pagenum: 305; label: 9.3.2
title: fgets()
pagenum: 306; label: 9.3.3
title: fgetc()
pagenum: 307; label: 9.3.4
title: fread()
pagenum: 307; label: 9.4
title: Writing Data to Files
pagenum: 308; label: 9.4.1
title: fprintf()
pagenum: 308; label: 9.4.2
title: fputs()
pagenum: 310; label: 9.4.3
title: fputc()
pagenum: 310; label: 9.4.4
title: fwrite()
pagenum: 311; label: 9.5
title: Detecting the End-of-File
pagenum: 311; label: 9.6
title: Error Handling During File Operations
pagenum: 312; label: 9.6.1
title: clearerr()
pagenum: 312; label: 9.6.2
title: perror()
pagenum: 313; label: 9.7
title: Accepting Command Line Arguments
pagenum: 313; label: 9.8
title: Functions for Selecting a Record Randomly
pagenum: 327; label: 9.8.1
title: fseek()
pagenum: 327; label: 9.8.2
title: ftell()
pagenum: 329; label: 9.8.3
title: rewind()
pagenum: 329; label: 9.8.4
title: fgetpos()
pagenum: 330; label: 9.8.5
title: fsetpos()
pagenum: 330; label: 9.9
title: remove()
pagenum: 331; label: 9.10
title: Renaming the File
pagenum: 331; label: 9.11
title: Creating a Temporary File
pagenum: 331; label: 10
title: Preprocessor Directives
pagenum: 336; label: 10.1
title: Introduction
pagenum: 336; label: 10.2
title: Types of Preprocessor Directives
pagenum: 336; label: 10.3
title: #define
pagenum: 337; label: 10.3.1
title: Object-like Macro
pagenum: 337; label: 10.3.2
title: Function-like Macros
pagenum: 338; label: 10.3.3
title: Nesting of Macros
pagenum: 339; label: 10.3.4
title: Rules for Using Macros
pagenum: 339; label: 10.3.5
title: Operators Related to Macros
pagenum: 339; label: 10.4
title: #include
pagenum: 340; label: 10.5
title: #undef
pagenum: 341; label: 10.6
title: #line
pagenum: 341; label: 10.7
title: Pragma Directives
pagenum: 342; label: 10.8
title: Conditional Directives
pagenum: 343; label: 10.8.1
title: #ifdef
pagenum: 344; label: 10.8.2
title: #ifndef
pagenum: 344; label: 10.8.3
title: The #if Directive
pagenum: 345; label: 10.8.4
title: The #else Directive
pagenum: 345; label: 10.8.5
title: The #elif Directive
pagenum: 345; label: 10.8.6
title: The #endif Directive
pagenum: 346; label: 10.9
title: The Defined Operator
pagenum: 346; label: 10.10
title: #error Directive
pagenum: 347; label: 10.11
title: Predefined Macro Names
pagenum: 347; title: Annexure 7
pagenum: 351; label: 11
title: Linked Lists
pagenum: 354; label: 11.1
title: Introduction
pagenum: 354; label: 11.2
title: Linked Lists versus Arrays
pagenum: 355; label: 11.3
title: Memory Allocation and Deallocation for a Linked List
pagenum: 355; label: 11.4
title: Different Types of Linked Lists
pagenum: 357; label: 11.5
title: Singly Linked List
pagenum: 357; label: 11.5.1
title: Traversing a Singly Linked List
pagenum: 357; label: 11.5.2
title: Inserting a New Node in a Linked List
pagenum: 358; label: 11.6
title: Circular Linked List
pagenum: 366; label: 11.7
title: Doubly Linked List
pagenum: 367; label: 11.8
title: Circular Doubly Linked List
pagenum: 368; label: 11.9
title: Header Linked List
pagenum: 368; title: Case Study for Chapters 8, 9, and 11
pagenum: 374; title: Answers to Objective Questions
pagenum: 378; title: Index
pagenum: 383