Unit 1 - The components of program structure.

Posted on Friday, May 7, 2010 by B[H] | 0 comments
Labels:

1. Declaration
A declarations associates a group of variables with a specific data type. All variables must be declared before they can appear in excutable statements.
Example :
int a, b, c;
float root1, root2;
char flag, text[80]

2. Input
A set of information called data will be entered into the computer from keyboard, floppy disk, hard disk etc. and stored in a portion of the computer memory. This input which is an input to the computer will then be processed to produced the desired result.

3. Storage
Every piece of information are stored within the computer’s memory which is encoded as some unique combination of zeros and ones. Small computers have memories that are organized into 8-bit multiples called bytes. Large computer have memories that are organized into words rather than bytes. Computers also employ auxiliary storage e.g. disks in addition to their primary memories

which allowed information to be stored permanently and can be physically disconnected when not in use.

4. Operation
There are two different ways computer can be utilized by many different users. These are batch mode and the interactive mode. In batch mode of operation the program and the data are typed into the computer and stored within computer’s memory and processed in its proper sequence. Large quantities of information can be transmitted into and out of the computer without the user present while the job being processed. Batch processing can be undesirable for simple jobs. In interactive mode the user and the computer are able to interact with each other during computational session.

5. Control
Program control refers to the order of execution of instructions in a program. The instruction can be executed sequentially – one by one, from top downwards or non sequential execution of program instruction. Most real life problems require some kind of decision making to take a certain course of action. This means that instruction or a whole block of instructions can be executed, repeated or skipped.

6. Output
The processed data which produced certain result is known as the output. The output data will be presented in a sheet of paper through the printer or display on a monitor.

No comments:

Post a Comment