C

Fundamental concept of Problem solving
Introduction
Problem solving strategies
Program design & implementation
Introduction to C
Introduction to C
How to open C program code window
Description of C code window
Editing File
Saving and Running a program
The components of C language
Structure of C Program
A sample of C language program
C character set and keywords
C character set and keywords
The C character set
Identifiers
Key words
Data Types
Data Types
Primary Data Type
Secondary Data Type
Variables
Introduction
Rules for constructing variables names
Variable declaration
Assigning values to variables
Scope of variables: Local & Global
Constants
Introduction
Character constants
Integer constants
Real constants
Logical & String constants
C instruction set
Introduction
Type Declaration & Input/Output Instructions
Arithmetic Instructions
Control Instructions
Operators
Introduction
Arithmetic operators
Relational operators
Logical operators
Increment & Decrement operators
Bitwise operators
Conditional & ternary operators
The comma operators
Size of operator
Assignment operator
Type modifier
Expressions
Evaluation of expression
Automatic type conversion
Basic Input/Output
Introduction
Console I/O function
Disc & Port I/O function
Control Structures
Sequence control statements
Decision control & conditional statements
Case control statements
Repitition & loop control statements
Some more statements
Array and String
Introduction of Array
Array Declaration
Array Initialization
Two Dimensional Array
Multi Dimensional Array
String
Function and Recursion
Function Definition
Function Declaration
Function Call
Recursion
Pointers
Introduction
Pointer expression
Pointer & functions
Pointer & Array
Multi Dimensional Arrays & Pointer
Arrays of Pointer
Use of Pointer & functions
Structures
Introduction
Giving values to member
Structure Initialization
Comparison of structure variables
Arrays of structures
Arrays within structures
Structures within structures
Passing structure to function
Union
Introduction
Accessing a union member
Initialization of Union variable
Uses of Union
Dynamic Data Structure
Linked list
Stack
Queue
Data File Handling through C
Introduction
File operation
Opening & closing a data file
Creating a data file
Processing a data file
Unformatted data file
C Preprocessor & Macro
Introduction
Macro substitution directives
File inclusion
Compiler control directive
Command line parameter of C
Command line parameter
Header file
Header file
Use of library functions
Some Useful library functions

Fundamental concept of Problem solving


Program design & implementation

There are two types of designing approach:
 
1. Top down design.
2. Bottom up design.
 
Both have been describe together with examples.
 
Any problem can be dealt with two ways, viz. top down or bottom up. A simple example is given here to illustrate the concept.
Sorting an array of numbers involves the following two steps:
 
1. Comparison
2. Exchange
 
1. Top down design:
 
At the top level, an algorithm has to be formulated to carry out sorting. Once the algorithm is confirmed, then the algorithms for comparison and exchange are formulated, before implementation of the entire algorithm.
 
Therefore, in this approach, one begins from the top level without bothering about the minute details for implementation, to start with.
 
2. Bottom up design:
 
The bottom up approach is just the reverse. The lower level tasks are first carried out and are then integrated to provide the solution.
 
In this method, lower level structures of the program are developed first and then progressively higher level structures are created.
 
Here the algorithms for exchange and comparison will be formulated before formulating the algorithm for the whole problem.
 
In any case, dividing the problem into small tasks and then solving each task provides the solution.
 
If the program development is assumed to be a single task and the program statements are developed in sequence, then it is quite likely that the program may not work.
 
Therefore, either the top down or bottom up methodology has to be adopted for dividing the problem into smaller modules and then solving it.
 
Difference between Top design and Bottom up approach:
 
In the top down methodology, the overall structure is defined before getting into details, but in the bottom up approach, the details are worked out first before defining the overall structure.
 
Implementation
 
A good program is one which contains a main function and the main function calls procedures or sub-programs or functions to carry out specific tasks.
 
The subprograms are dependent on the main program. They do what the main program asks them to do.
 
Each language gives different names to sub-programs. Sub programs are known as functions in C.
 
The quality of program will also get enhanced when the program is made modular as mentioned above with functions.
 
Each function will receive input and may return some output to the called program.
 
By dividing the problem into a number of functions, the problem can be divided and conquered.
 
This facilities focus on small programs and dealing with one problem at a time.