ABSTRACT

This chapter begins with a definition of the term “program” and then a “computer program” sourced from the dictionary, the Institute of Electrical and Electronics Engineers (IEEE), and Wikipedia, extending them with the needed information. Then the components of a computer program are enumerated and explained. The program statements, the source code object code, and the executable code are described so the reader understands not only these terms but also how to differentiate between them. After learning these, the reader is ready to understand the process of writing computer programs, and it is described in significant detail. The steps in developing the programs, like entering and editing the program, compiling it, rectifying the syntax errors, producing the object code, and linking the object code to the libraries to produce the executable code, are explained. It is not adequate to produce the executable code, as defects may lurk inside the code. So, we execute the executable code with test data and rectify all the defects that are uncovered. Then, to give a complete understanding to the reader, the process of how the computer executes a program is given in detail. For the programmer to understand that there are different styles of writing computer programs, the free-fall programming and structured programming are described. It is emphasized that the readability of the program is important, as it has to be read by others for the purpose of quality assurance as well as for program maintenance. Lastly, the structure of an efficient computer program is explained to cover all aspects of a computer program.