Saturday, May 2, 2015

What is Program?

What is Program?
The set of instructions which command the computer to perform particular operation or a specific task is called a program.
Program is written in a programming language then translated into machine code by a language processor so that the computer can execute task. The programming language statements are the source program or source code and this object code is linked with other library codes to create the program. A program is composed of list of instructions to perform a specific job. An instruction is also called statement. It is independent of its own and it is created by a programmer. Program cannot be categorized according to needs and uses. Generally, a statement is an instruction to do only one task.
                For example
                #include<stdio.h>
                #include<conio.h>
                Void main()
                {
                                Int n;
                                Clrscr();
                                Printf (“Input a number to check if is even or odd :”);
                                Scanf(“%d”,&n);
                                If(n%2==0)
                                                Printf(“%d is even”,n);
                                Else
                                                Printf(“%d is odd”,n);
                                getch();

Qualities of Good Program
A program can be considered as a good program, they are:
Ø  It should be correct. It should not contain error.
Ø  It should be efficient in terms processing and memory utilization.
Ø  It should have easier user interface.
Ø  It should be easy to maintain and update.
Ø  It should be flexible.
Ø  It should be reliable.
Ø  It should be portable.
Ø  It should be easy to understand.



No comments:

Post a Comment