1.15.5.Source code header comments |
|
- At the beginning of the program is a comment block.
- The comment block contains information about the program.
- Boxing the comments makes them stand out.
|
The some of the sections as follows should be included. |
- Heading.
- Author.
- Purpose.
- Usage.
- References.
- File formats. A short description of the formats which will be used in the program.
- Restrictions.
- Revision history.
- Error handling.
- Notes. Include special comments or other information that has not already been covered.
|
/********************************************************
* hello -- program to print out "Hello World". *
* *
* Author: FirstName, LastName *
* *
* Purpose: Demonstration of a simple program. *
* *
* Usage: *
* Runs the program and the message appears. *
********************************************************/
#include <stdio.h>
int main()
{
/* Tell the world hello */
printf("Hello World\n");
return (0);
}
|
|
Hello World |