An edition of Introduction to C Programming (2013)

Introduction to C Programming

  • 3.0 (1 rating)
  • 57 Want to read
  • 8 Currently reading
  • 2 Have read
Preview

My Reading Lists:

Create a new list

  • 57 Want to read
  • 8 Currently reading
  • 2 Have read

Buy this book

Last edited by ImportBot
April 6, 2023 | History
An edition of Introduction to C Programming (2013)

Introduction to C Programming

  • 3.0 (1 rating)
  • 57 Want to read
  • 8 Currently reading
  • 2 Have read

This work doesn't have a description yet. Can you add one?

Publish Date
Language
English
Pages
394

Buy this book

Previews available in: English

Edition Availability
Cover of: Introduction to C Programming
Introduction to C Programming
2014, Oxford University Press India, Oxford University Press
in English
Cover of: Introduction to C Programming
Introduction to C Programming
2013, Oxford University Press
in English

Add another edition?

Book Details


Table of Contents

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

Classifications

Library of Congress
QA76.73.C15T53 2015, QA76.73.C15 T52 2015, QA76.73.C15 T53 2015

Edition Identifiers

Open Library
OL28548464M
Internet Archive
introductiontocp0002thar
ISBN 13
9780199452057
LCCN
2016303307
OCLC/WorldCat
921526477

Work Identifiers

Work ID
OL21090538W

Community Reviews (0)

No community reviews have been submitted for this work.

Lists

Download catalog record: RDF / JSON