Programming in C
Programming in C
ISBN 9789393665461
 Publication Date

PAPERBACK

EBOOK (EPUB)

EBOOK (PDF)

This book, Programming in C, with its emphasis on programming basics and reader-friendly text, has been designed to address the requirements of undergraduate students who learn the subject in their curriculum and it covers the syllabi of all major universities.

  • Title Page
  • Copyright Page
  • Dedication
  • Contents
  • Preface
  • Chapter 1 Introduction to C Language
    • 1.1 Introduction
    • 1.2 Need for C programming
    • 1.3 Why to Learn C Language?
    • 1.4 Compiling and Executing C program
    • 1.5 Structure of a C program
      • 1.5.1 Sample Programs
      • 1.5.2 Library Functions in Header File
    • Summary
    • Review Questions
    • Programming Exercises
    • Debugging Exercises
  • Chapter 2 Declarations in C
    • 2.1 Introduction
    • 2.2 Character Set
    • 2.3 C Tokens
      • 2.3.1 Keywords
      • 2.3.2 Identifiers
      • 2.3.3 Constants
      • 2.3.4 Strings
      • 2.3.5 Special Symbols
      • 2.3.6 Operators
    • 2.4 Variables
      • 2.4.1 Variable Declaration
      • 2.4.2 Assignment / Initialization of Variables
      • 2.4.3 Constant Variables
      • 2.4.4 Volatile Variables
    • 2.5 Data Types
      • 2.5.1 Primitive Data Types
      • 2.5.2 Derived Data Types
      • 2.5.3 User Defined Data Types
    • 2.6 Storage Classes
      • 2.6.1 Automatic Variable
      • 2.6.2 Register Variable
      • 2.6.3 Static Variable
      • 2.6.4 External Variable
    • Summary
    • Review Questions
    • Programming Exercises
    • Debugging Exercises
  • Chapter 3 Operators and Expressions
    • 3.1 Introduction
      • 3.1.1 Arithmetic Operators
      • 3.1.2 Relational Operators
      • 3.1.3 Logical Operators
      • 3.1.4 Assignment Operator
      • 3.1.5 Conditional Operator
      • 3.1.6 Bitwise Operators
      • 3.1.7 Special Operators
    • 3.2 Arithmetic Expressions
      • 3.2.1 Operator Precedence and Associativity
      • 3.2.2 Type Conversion / Casting
    • 3.3 Mathematical Functions
    • Summary
    • Review Questions
    • Programming Exercises
    • Debugging Exercises
  • Chapter 4 Input and Output Operations in C
    • 4.1 Introduction
    • 4.2 Input/ Output Functions (I/O Functions)
    • 4.3 Unformatted Character Functions
      • 4.3.1 Input Functions
      • 4.3.2 Output Functions
      • 4.3.3 Reading and Displaying Strings (Unformatted Functions)
    • 4.4 Formatted Input/ Output Functions
      • 4.4.1 Formatted Input Functions
      • 4.4.2 Formatted Output Functions
    • 4.5 gotoxy() Function
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 5 Decision Making and Branching
    • 5.1 Introduction
    • 5.2 if Statement
      • 5.2.1 Simple if Statement
      • 5.2.2 if-else Statement
      • 5.2.3 nested if Statement
      • 5.2.4 else-if Ladder
    • 5.3 switch case Statement
    • 5.4 Conditional Operator
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 6 Looping and Control Structures
    • 6.1 Introduction
    • 6.3 DO..WHILE Statement
    • 6.4 FOR Statement
      • 6.4.1 Variations of FOR Loop
      • 6.4.2 Nested FOR Construct
    • 6.5 Unconditional Constructs
      • 6.5.1 BREAK Statement
      • 6.5.2 CONTINUE Statement
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 7 Arrays
    • 7.1 Introduction
    • 7.2 Features of Arrays
    • 7.3 Single-Dimensional Numeric Array
      • 7.3.1 Declaration
      • 7.3.2 Initialization
      • 7.3.3 Reading and Writing
    • 7.4 Two-Dimensional Array
      • 7.4.1 Declaration
      • 7.4.2 Initialization
      • 7.4.3 Reading and Writing
    • 7.5 Multidimensional Array
    • Summary
    • Case Study
    • Review Questions
    • Programming Exercises
    • Debugging Exercises
  • Chapter 8 Character Array and Strings
    • 8.1 Introduction
    • 8.2 Declaring and Initializing String Variables
    • 8.3 Reading Strings from Terminal
      • 8.3.1 scanf Function
      • 8.3.2 getchar Function
      • 8.3.3 gets Function
    • 8.4 Writing Strings to the Terminal
      • 8.4.1 printf Function
      • 8.4.2 putchar Function
      • 8.4.3 puts Function
    • 8.5 String Handling Functions in C
      • 8.5.1 strlen Function
      • 8.5.2 strlwr and strupr Functions
      • 8.5.3 strcat Function
      • 8.5.4 strncat Function
      • 8.5.5 strcpy Function
      • 8.5.6 strcmp Function
      • 8.5.7 strcmpi Function
      • 8.5.8 strncmp Function
      • 8.5.9 strnicmp Function
      • 8.5.10 strdup Function
      • 8.5.11 strstr Function
      • 8.5.12 strset Function
      • 8.5.13 strnset Function
      • 8.5.14 strrev Function
    • 8.6 Two Dimensional Character Array
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 9 User-Defined Functions
    • 9.1 Introduction
    • 9.2 Need for Function
    • 9.3 Function Prototyping / Function Declaration
    • 9.4 Syntax of C Function
    • 9.5 Control Flow of Function Execution
    • 9.6 Introduction to Parameter Passing Technique
      • 9.6.1 No Arguments and No Return Values
      • 9.6.2 With Arguments and No Return Values
      • 9.6.3 No Arguments and a Return Value
      • 9.6.4 With Arguments and Return Values
    • 9.7 Built-in Functions
    • 9.8 Nested Functions
    • 9.9 Recursion
    • 9.10 Passing Arrays to Functions
      • 9.10.1 Passing Two Dimensional Arrays to Functions
      • 9.10.2 Passing Strings to Functions
    • 9.11 Parameter Passing Techniques
    • 9.12 Scope, Visibility and Lifetime of Variables
      • 9.12.1 Automatic/Local Variables
      • 9.12.2 External/ Global Variables
      • 9.12.3 Static Variables
      • 9.12.4 Register Variables
    • 9.13 Multifile Programs
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 10 Pointers
    • 10.1 Understanding Pointers
    • 10.2 Declaration of a Pointer Variable
    • 10.3 Accessing the Address of a Variable
    • 10.4 Initialization of Pointers
    • 10.5 Memory Allocation
      • 10.5.1 Static Memory Allocation
      • 10.5.2 Dynamic Memory Allocation
    • 10.6 Pointer Arithmetic
      • 10.6.1 Addition of a Number to a Pointer
      • 10.6.2 Subtraction of a Number from a Pointer
      • 10.6.3 Subtraction of a Pointer from Another Pointer
      • 10.6.4 Increment and Decrement Operations
      • 10.6.5 Pointer Comparison
    • 10.7 Pointers and Arrays
      • 10.7.1 Pointers and One-Dimensional Array
      • 10.7.2 Pointers and Two-Dimensional Array
      • 10.7.3 Pointers and Character Strings
    • 10.8 Pointers as Function Arguments / Call by Reference
    • 10.9 Function Returning Pointer
    • 10.10 Pointer to Function
    • 10.11 Pointer to Pointer
    • 10.12 Advantages of Pointers
    • 10.13 Disadvantages of Pointers
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 11 Structures and Unions
    • 11.1 Introduction
    • 11.2 Declaration of Structure
    • 11.3 Initializing Structure Variables
    • 11.4 Accessing Structure Elements
    • 11.5 Storage Representation of the Structure Variables
    • 11.6 Reading and Writing Operation in Structure
    • 11.7 Nested Structure
    • 11.8 Arrays of Structures
    • 11.9 Arrays within Structures
    • 11.10 Structures and Functions
      • 11.10.1 Passing Each Member of the Structure as an Argument to Function
      • 11.10.2 Passing the Copy of the Entire Structure as an Argument to Function
      • 11.10.3 Using Pointers to Pass the Structure as an Argument
    • 11.11 Size of Structures
    • 11.12 Unions
    • 11.13 Bit Fields
    • 11.14 Comparison of Structure and Union
    • Summary
    • Review Questions
    • Explanatory Questions
    • Programming Exercises
  • Chapter 12 Preprocessor Directives
    • 12.1 Introduction
    • 12.2 Classification of Preprocessor Directives
      • 12.2.1 Macro Substitution
      • 12.2.3 Undefining a Macro
    • 12.3 File Inclusion
    • 12.4 Compiler Control Directives
    • 12.5 Additional Directives
      • 12.5.1 Pragma Directive
      • 12.5.2 #error Directive
      • 12.5.3 Stringizing Operator (#)
      • 12.5.4 Token Pasting Operator (##)
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 13 File Management in C
    • 13.1 Introduction
    • 13.2 File and its Operations
    • 13.3 Defining and Opening a File
    • 13.4 Closing Files
    • 13.5 Reading and Writing Operations on a File
      • 13.5.1 getc and putc Function
      • 13.5.2 getw and putw Function
      • 13.5.3 Reading and Writing Operations Using Text Streams
    • 13.6 Error Handling Functions
    • 13.7 Random Access to Files
    • 13.8 Command Line Arguments
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 14 Introduction to Object Oriented Programming
    • 14.1 Introduction
      • 14.1.1 Major Drawbacks of Procedural Programming
    • 14.2 Characteristics of Procedure Oriented Approach
    • 14.3 The Object-Oriented Approach
      • 14.3.1 Features of Object Oriented Approach
    • 14.4 Characteristics of Object-Oriented Languages
      • 14.4.1 Objects
      • 14.4.2 Classes
      • 14.4.3 Data Abstraction and Encapsulation
      • 14.4.4 Inheritance
      • 14.4.5 Polymorphism
      • 14.4.6 Dynamic Binding
    • 14.5 Advantages of Object Oriented Programming
    • 14.6 Differences between Structured Programming and Object Oriented Programming
    • 14.7 Object Oriented and Object based Languages
    • 14.8 Applications of Object Oriented Programming
    • Summary
    • Review Questions
  • Previous Year Question Papers
  • Index

Dr K Sasi Kala Rani is currently Associate Professor and Head of Computer Science and Engineering, Hindusthan Institute of Technology, Coimbatore. She has over 15 years of teaching experience. Her areas of interest include Database Management Systems, Software Engineering, Computer Networks and Object Oriented Analysis and Design. She has published eight papers in international journals

Comments should not be blank
Rating
Description

This book, Programming in C, with its emphasis on programming basics and reader-friendly text, has been designed to address the requirements of undergraduate students who learn the subject in their curriculum and it covers the syllabi of all major universities.

Table of contents
  • Title Page
  • Copyright Page
  • Dedication
  • Contents
  • Preface
  • Chapter 1 Introduction to C Language
    • 1.1 Introduction
    • 1.2 Need for C programming
    • 1.3 Why to Learn C Language?
    • 1.4 Compiling and Executing C program
    • 1.5 Structure of a C program
      • 1.5.1 Sample Programs
      • 1.5.2 Library Functions in Header File
    • Summary
    • Review Questions
    • Programming Exercises
    • Debugging Exercises
  • Chapter 2 Declarations in C
    • 2.1 Introduction
    • 2.2 Character Set
    • 2.3 C Tokens
      • 2.3.1 Keywords
      • 2.3.2 Identifiers
      • 2.3.3 Constants
      • 2.3.4 Strings
      • 2.3.5 Special Symbols
      • 2.3.6 Operators
    • 2.4 Variables
      • 2.4.1 Variable Declaration
      • 2.4.2 Assignment / Initialization of Variables
      • 2.4.3 Constant Variables
      • 2.4.4 Volatile Variables
    • 2.5 Data Types
      • 2.5.1 Primitive Data Types
      • 2.5.2 Derived Data Types
      • 2.5.3 User Defined Data Types
    • 2.6 Storage Classes
      • 2.6.1 Automatic Variable
      • 2.6.2 Register Variable
      • 2.6.3 Static Variable
      • 2.6.4 External Variable
    • Summary
    • Review Questions
    • Programming Exercises
    • Debugging Exercises
  • Chapter 3 Operators and Expressions
    • 3.1 Introduction
      • 3.1.1 Arithmetic Operators
      • 3.1.2 Relational Operators
      • 3.1.3 Logical Operators
      • 3.1.4 Assignment Operator
      • 3.1.5 Conditional Operator
      • 3.1.6 Bitwise Operators
      • 3.1.7 Special Operators
    • 3.2 Arithmetic Expressions
      • 3.2.1 Operator Precedence and Associativity
      • 3.2.2 Type Conversion / Casting
    • 3.3 Mathematical Functions
    • Summary
    • Review Questions
    • Programming Exercises
    • Debugging Exercises
  • Chapter 4 Input and Output Operations in C
    • 4.1 Introduction
    • 4.2 Input/ Output Functions (I/O Functions)
    • 4.3 Unformatted Character Functions
      • 4.3.1 Input Functions
      • 4.3.2 Output Functions
      • 4.3.3 Reading and Displaying Strings (Unformatted Functions)
    • 4.4 Formatted Input/ Output Functions
      • 4.4.1 Formatted Input Functions
      • 4.4.2 Formatted Output Functions
    • 4.5 gotoxy() Function
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 5 Decision Making and Branching
    • 5.1 Introduction
    • 5.2 if Statement
      • 5.2.1 Simple if Statement
      • 5.2.2 if-else Statement
      • 5.2.3 nested if Statement
      • 5.2.4 else-if Ladder
    • 5.3 switch case Statement
    • 5.4 Conditional Operator
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 6 Looping and Control Structures
    • 6.1 Introduction
    • 6.3 DO..WHILE Statement
    • 6.4 FOR Statement
      • 6.4.1 Variations of FOR Loop
      • 6.4.2 Nested FOR Construct
    • 6.5 Unconditional Constructs
      • 6.5.1 BREAK Statement
      • 6.5.2 CONTINUE Statement
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 7 Arrays
    • 7.1 Introduction
    • 7.2 Features of Arrays
    • 7.3 Single-Dimensional Numeric Array
      • 7.3.1 Declaration
      • 7.3.2 Initialization
      • 7.3.3 Reading and Writing
    • 7.4 Two-Dimensional Array
      • 7.4.1 Declaration
      • 7.4.2 Initialization
      • 7.4.3 Reading and Writing
    • 7.5 Multidimensional Array
    • Summary
    • Case Study
    • Review Questions
    • Programming Exercises
    • Debugging Exercises
  • Chapter 8 Character Array and Strings
    • 8.1 Introduction
    • 8.2 Declaring and Initializing String Variables
    • 8.3 Reading Strings from Terminal
      • 8.3.1 scanf Function
      • 8.3.2 getchar Function
      • 8.3.3 gets Function
    • 8.4 Writing Strings to the Terminal
      • 8.4.1 printf Function
      • 8.4.2 putchar Function
      • 8.4.3 puts Function
    • 8.5 String Handling Functions in C
      • 8.5.1 strlen Function
      • 8.5.2 strlwr and strupr Functions
      • 8.5.3 strcat Function
      • 8.5.4 strncat Function
      • 8.5.5 strcpy Function
      • 8.5.6 strcmp Function
      • 8.5.7 strcmpi Function
      • 8.5.8 strncmp Function
      • 8.5.9 strnicmp Function
      • 8.5.10 strdup Function
      • 8.5.11 strstr Function
      • 8.5.12 strset Function
      • 8.5.13 strnset Function
      • 8.5.14 strrev Function
    • 8.6 Two Dimensional Character Array
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 9 User-Defined Functions
    • 9.1 Introduction
    • 9.2 Need for Function
    • 9.3 Function Prototyping / Function Declaration
    • 9.4 Syntax of C Function
    • 9.5 Control Flow of Function Execution
    • 9.6 Introduction to Parameter Passing Technique
      • 9.6.1 No Arguments and No Return Values
      • 9.6.2 With Arguments and No Return Values
      • 9.6.3 No Arguments and a Return Value
      • 9.6.4 With Arguments and Return Values
    • 9.7 Built-in Functions
    • 9.8 Nested Functions
    • 9.9 Recursion
    • 9.10 Passing Arrays to Functions
      • 9.10.1 Passing Two Dimensional Arrays to Functions
      • 9.10.2 Passing Strings to Functions
    • 9.11 Parameter Passing Techniques
    • 9.12 Scope, Visibility and Lifetime of Variables
      • 9.12.1 Automatic/Local Variables
      • 9.12.2 External/ Global Variables
      • 9.12.3 Static Variables
      • 9.12.4 Register Variables
    • 9.13 Multifile Programs
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 10 Pointers
    • 10.1 Understanding Pointers
    • 10.2 Declaration of a Pointer Variable
    • 10.3 Accessing the Address of a Variable
    • 10.4 Initialization of Pointers
    • 10.5 Memory Allocation
      • 10.5.1 Static Memory Allocation
      • 10.5.2 Dynamic Memory Allocation
    • 10.6 Pointer Arithmetic
      • 10.6.1 Addition of a Number to a Pointer
      • 10.6.2 Subtraction of a Number from a Pointer
      • 10.6.3 Subtraction of a Pointer from Another Pointer
      • 10.6.4 Increment and Decrement Operations
      • 10.6.5 Pointer Comparison
    • 10.7 Pointers and Arrays
      • 10.7.1 Pointers and One-Dimensional Array
      • 10.7.2 Pointers and Two-Dimensional Array
      • 10.7.3 Pointers and Character Strings
    • 10.8 Pointers as Function Arguments / Call by Reference
    • 10.9 Function Returning Pointer
    • 10.10 Pointer to Function
    • 10.11 Pointer to Pointer
    • 10.12 Advantages of Pointers
    • 10.13 Disadvantages of Pointers
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 11 Structures and Unions
    • 11.1 Introduction
    • 11.2 Declaration of Structure
    • 11.3 Initializing Structure Variables
    • 11.4 Accessing Structure Elements
    • 11.5 Storage Representation of the Structure Variables
    • 11.6 Reading and Writing Operation in Structure
    • 11.7 Nested Structure
    • 11.8 Arrays of Structures
    • 11.9 Arrays within Structures
    • 11.10 Structures and Functions
      • 11.10.1 Passing Each Member of the Structure as an Argument to Function
      • 11.10.2 Passing the Copy of the Entire Structure as an Argument to Function
      • 11.10.3 Using Pointers to Pass the Structure as an Argument
    • 11.11 Size of Structures
    • 11.12 Unions
    • 11.13 Bit Fields
    • 11.14 Comparison of Structure and Union
    • Summary
    • Review Questions
    • Explanatory Questions
    • Programming Exercises
  • Chapter 12 Preprocessor Directives
    • 12.1 Introduction
    • 12.2 Classification of Preprocessor Directives
      • 12.2.1 Macro Substitution
      • 12.2.3 Undefining a Macro
    • 12.3 File Inclusion
    • 12.4 Compiler Control Directives
    • 12.5 Additional Directives
      • 12.5.1 Pragma Directive
      • 12.5.2 #error Directive
      • 12.5.3 Stringizing Operator (#)
      • 12.5.4 Token Pasting Operator (##)
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 13 File Management in C
    • 13.1 Introduction
    • 13.2 File and its Operations
    • 13.3 Defining and Opening a File
    • 13.4 Closing Files
    • 13.5 Reading and Writing Operations on a File
      • 13.5.1 getc and putc Function
      • 13.5.2 getw and putw Function
      • 13.5.3 Reading and Writing Operations Using Text Streams
    • 13.6 Error Handling Functions
    • 13.7 Random Access to Files
    • 13.8 Command Line Arguments
    • Summary
    • Review Questions
    • Programming Exercises
  • Chapter 14 Introduction to Object Oriented Programming
    • 14.1 Introduction
      • 14.1.1 Major Drawbacks of Procedural Programming
    • 14.2 Characteristics of Procedure Oriented Approach
    • 14.3 The Object-Oriented Approach
      • 14.3.1 Features of Object Oriented Approach
    • 14.4 Characteristics of Object-Oriented Languages
      • 14.4.1 Objects
      • 14.4.2 Classes
      • 14.4.3 Data Abstraction and Encapsulation
      • 14.4.4 Inheritance
      • 14.4.5 Polymorphism
      • 14.4.6 Dynamic Binding
    • 14.5 Advantages of Object Oriented Programming
    • 14.6 Differences between Structured Programming and Object Oriented Programming
    • 14.7 Object Oriented and Object based Languages
    • 14.8 Applications of Object Oriented Programming
    • Summary
    • Review Questions
  • Previous Year Question Papers
  • Index
Biographical note

Dr K Sasi Kala Rani is currently Associate Professor and Head of Computer Science and Engineering, Hindusthan Institute of Technology, Coimbatore. She has over 15 years of teaching experience. Her areas of interest include Database Management Systems, Software Engineering, Computer Networks and Object Oriented Analysis and Design. She has published eight papers in international journals

User Reviews
Comments should not be blank
Rating