<< Back
The following steps are used in sequence for developing an efficient program:
Specifying the Problem:
The Problem which has to be implemented into a program must be thoroughly understood before the program is written. Problem must be analyzed to determine the input and output requirements of the program. A problem is created with these specifications.
Designing an Algorithm:
With the problem statement obtained in the previous step, various methods available for obtaining the required solution are analyzed and the best suitable method is designed into algorithm.
To improve clarity and understandability of the program flow charts are drawn using the algorithms.
Coding:
The actual program is written in the required programming language with the help of information depicted in flow charts and algorithms.
Debugging:
There is a possibility of occurrence of errors in programs. These errors must be removed to ensure proper working of programs. Hence error check is made. This process is known as “Debugging”.
Types of errors that may occur in the program are:
Syntax means rules of writing the program.
Example: x=z*/b;
There is syntax error in this statement. The rules of binary operators state that there cannot be more than one operator between two operands.
Example: Divide by zero
Range out of bounds
Square root of a negative number
Testing and Validating:
Testing and Validation is performed to check whether the program is producing correct results or not for different values of input.
Documentation and Maintenance:
Documentation is the process of collecting, organizing and maintaining, in written the complete information of the program for future references. Maintenance is the process of upgrading the program according to the changing requirements.
For writing up the instructions as a program in the way that a computer can understand, we use programming languages.
There exists a level of programming languages.
Example: 1. ADD for addition
2. MOV for moving the data etc...
Example: BASIC, FORTRAN, COBOL, etc…
Example: dBASE, FoxPro etc…
C is a Programmer’s Language
In contrast, C was created, influenced, and field-tested by working programmers. The end result is that C gives the programmer what the programmer wants: few restrictions, few complaints, block structure, stand-alone functions, and a compact set of keywords.
Initially, C was used for systems programming. A systems program forms a portion of the operating system of the computer or its support utilities, such as editors, compilers, linkers, and the like. As C grew in popularity, many programmers began to use it to program all the tasks because of its portability and efficiency. At the time of creation, C was a much longed-for, dramatic improvement in programming languages.
FEATURES OF C
C being popular language, all the instructions is given using simple English like statements. It uses a compiler which translates these instructions to binary, called object code. This object code is taken by linker who generates another binary coded program, called executable code. This is code which can be executable on the system.