At this point in the cycle, you may feel that just getting your program to compile without errors and running it without crashing your computer means you are done. However, you are not. You must verify that what you think your program was supposed to do is what it actually did do. Did your program solve the problem it was intended to? Is the result correct?
So, you have to return to writing your original program and then compare that to the output your program gives. If your intended result matches, your program is correct. You are done.
As we get further into writing more complex programs, we will see that a proper or good program exhibits each of the following qualities:
- Correct: The program does what it's supposed to do.
- Complete: The program does everything it's supposed to do.
- Concise: The program does no more than it's supposed to do and it does so as efficiently as possible.
- Clear: The program is easily understandable to those who use it and to those who must maintain it.
For most of this book, we will concern ourselves largely with correctness, completeness, and clarity. Currently, hello1.c is not complete, nor clear, and we will see why shortly.