Sei sulla pagina 1di 7

PROGRAMMING AND DATA STRUCTURES

TABLE OF CONTENTS

1. Introduction to C
1.1 Introduction to C
1.2 Uses of C
1.3 Evolution of C
1.4 Characteristics of C
1.5 Structure of C Program
1.6 C Compilation Model
1.7 Features of C
1.8 Summary
1.9 Review Questions

2. C Declarations
2.1 Introduction
2.2 Character Set
2.3 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 Data Types
2.5 Summary

2.6 Review Questions

3. Operations and Expressions


3.1 Introduction
3.2 Arithmetic Operators
3.3 Relational Operators
3.4 Logical Operators
3.5 Assignment Operators
3.6 Increment and Decrement Operators
3.7 Conditional Operators
3.8 Bitwise Operators
3.9 Special Operators
3.10 Arithmetic Expressions
3.11 Type Conversions
3.12 Summary
3.13 Review Questions

4. Control Statements
4.1 Introduction
4.2 Selection Statements
4.2.1 Simple if
4.2.2 if…else
4.2.3 Nested if…else
4.2.4 else if ladder
4.2.5 switch
4.3 Iterative Statements
4.3.1 while loop
4.3.2 do…while loop
4.3.3 for loop
4.4 Jumping Satements
4.4.1 break
4.4.2 continue
4.4.3 goto
4.5 Summary
4.6 Review Questions
4.7 Programming Exercises

5. Functions
5.1 Introduction
5.2 Benefits of Functions
5.3 Need for Functions
5.4 Function Prototypes
5.5 Function Definition
5.6 Function Call
5.7 Recursion
5.8 Nesting of Functions
5.9 Passing arguments
5.9.1 Call by Value
5.9.2 Call by Reference
5.10 Function Overloading
5.11 Summary
5.12 Review Questions

5.13 Programming Exercises

6. Arrays
6.1 Introduction
6.2 Need for an Array
6.3 Definition of an Array
6.4 Memory Organization of an Array
6.5 Array Declaration
6.6 Accessing Array Elements
6.7 Array Initialization
6.8 Basic Operations on Array
6.9 Getting the values for Array
6.10 Putting out the Array Elements
6.11 Types of Array
6.11.1 One Dimensional Array
6.11.2 Multi-Dimensional Array
6.12 Advantages of an Array
6.13 Limitations of an Array
6.14 Summary
6.15 Review Questions

6.16 Programming Exercises

7. Preprocessors
7.1 Introduction
7.2 File Inclusion
7.3 Macro Substitution
7.4 Conditional Compilation
7.5 Summary
7.6 Review Questions

7.7 Programming Exercises

8. Pointers
8.1
8.4 Summary
8.5 Review Questions

8.6 Programming Exercises

9. Structures & Unions


9.1 Defining a structure
9.2 Structure Initialization
9.3 Declaring Structure Variables
9.4 Accessing Structure Members
9.5 Array of Structure
9.6 Structures containing arrays
9.7 Structures and pointers
9.8 Nested Structures
9.9 Structure as function arguments
9.9.1 Passing structure by value
9.9.2 Passing structure by reference
9.10 Introduction to Unions
9.11 Difference between Union and Structure
9.12 Accessing a Union Member
9.13 Pointer to union
9.14 Example Program for Union
9.15 Summary
9.16 Review Questions

9.17 Programming Exercises

10. File Handling


10.1 What is a File?
10.2 Why files are needed?
10.3 Modes of files
10.3.1 ASCII Text files
10.3.2 Binary files
10.4 Steps for File operations
10.5 File manipulations
10.5.1 Opening Files
10.5.2 Closing a File
10.5.3 Writing a File
10.5.4 Reading a File
10.6 Binary files
10.7 Stdio file
10.8 Summary
10.9 Review Questions
10.10 Programming Exercises

11. Introduction to Data Structures


11.1Introduction
11.2 What is information?
11.3 What is data structure?
11.4 Why data structures?
11.5 Types of memory allocation
11.5.1 Static Memory Allocation
11.5.2 Dynamic Memory Allocation
11.6 Summary
11.7 Review Questions

12. Linear Structures


12.1 Linear Vs. Non Linear Data Structures
12.2 Abstract Data Type (ADT)
12.3 List ADT
12.4 Array
12.5 Linked list
12.6 Difference between Array and Linked List
12.7 Types of linked list
12.8 Singly linked list
12.8.1 Creating a linked list
12.8.2 Insertion at linked list
12.8.3 Deletion of an element from linked list
12.8.4 Displaying the contents of the linked list
12.8.5 Searching an element from the linked list
12.8.5 Counting the number of nodes in a linked list
12.8.6 Reversing the linked list
12.8.7 C implementation of singly linked list
12.9 Doubly linked list
12.9.1 Creating a doubly linked list
12.9.2 Insertion at doubly linked list
12.9.3 Deletion of an element from doubly linked list
12.9.4 Displaying the contents of the linked list
12.9.5 C implementation of doubly Linked List
12.10 Circular Linked List
12.11 Empty Linked List
12.12 Empty Circular Linked List
12.13 Applications of Linked List
12.13.1 Polynomial ADT
12.13.2 Radix Sort
12.13.3 Multi list
12.14 Cursor Implementation of Linked List
12.15 Summary
12.16 Review Questions

13. Stack
13.1 What is a stack?
13.2 Operations on Stack
13.3 Array based implementation of stack
13.4 Linked list implementation of stack
13.4.1 C Program for linked list implementation of stack
13.5 Applications of Stack
13.5.1 Balancing Symbols
13.5.2 Evaluating Postfix Expression
13.5.3 Conversion of Infix to postfix form
13.5.4 Recursive Function
13.6 Summary

13.7 Review Questions


14. Queue
14.1 What is Queue?
14.2 Operations on Queue
14.3 Applications of Queue
14.4 Array based implementation of Queue
14.5 Linked list implementation of Queue
14.5.1 C Program for linked list implementation of queue
14.6 Circular Queue Implementation
14.6.1 Limitations of Linear Array Based Queues
14.7 Double Ended Queues
14.8 Summary
14.9 Review Questions

15. Sorting
15.1 Introduction
15.2 Types of Sorting
15.3 Bubble Sort
15.4 Insertion Sort
15.5 Selection Sort
15.6 Shell Sort
15.7 Heap Sort
15.8 Merge Sort
15.9 Quick Sort
15.10Bucket Sort
15.11Indirect Sorting
15.11.1 Two Way Merge
15.11.2. Multi way Merge
15.11.3. Replacement Selection
15.12 Summary
15.13 Review Questions

16. Searching
16.1 Introduction
16.2 Types of Searching
16.3 Linear Search
16.4 Binary Search
16.5 Linear Search vs. Binary Search
16.6 Summary
16.7 Review Questions

17. Hashing
17.1 What is Hashing?
17.2 Hash Function
17.3 Types of Hashing
17.3.1 Separate chaining
17.3.2 Open Addressing
17.4 Types of Open Addressing
17.4.1 Linear Probing
17.4.2 Quadratic Probing
17.4.3 Double Hashing
17.5 Rehashing
17.6 Extendible Hashing
17.7 Applications of Hashing
17.8 Summary
17.9 Review Questions

Appendix A - Two Marks Question Bank


Appendix B – Sample C Programs
Appendix C - University Question papers
Appendix D - Solved University Question papers
Appendix E - Lab Programs