8.
Check-list:
1.
Specification
Is the functionality described in the specification fully implemented
by the code?
Is there any excess functionality implemented by the code but
not described in the specification?
Is the program interface implemented as described in the speci
cation?
2. Initialisation and Declarations
Are all local and global variables initialised before use?
Are variables and class members i) required, ii) of the appropriate
type and iii) correctly scoped?
3.
Function Calls
Are parameters presented in the correct order?
Are pointers and & used correctly?
Is the correct function being called, or should it be a di erent
function with a similar name?
4.
Arrays
Are there any o -by-one errors in array indexing?
Can array indexes ever go out-of-bounds?
5.
Pointers and Strings
Check that pointers are initialised to NULL
Check that pointers are never unexpectedly NULL
Check that all strings are identi ed by pointers and are NULL-terminated
at all points in the program
6.
Dynamic Storage Allocation
Is too much/too little space allocated?
7.
Output Format
Are there any spelling or grammatical errors in displayed output?
Is the output formatted correctly in terms of line stepping and
spacing?
8.
Computation, Comparisons and Assignments
Check order of computation/evaluation, operator precedence and
parenthesising
Can the denominator of a division ever be zero?
Is integer arithmetic, especially division, ever used inappropriately,
causing unexpected truncation/rounding?
Are the comparison and boolean operators correct?
If the test is an error-check, can the error condition actually
be legitimate in some cases? Does the code rely on any implicit
type conversions?
9.
Flow of Control
In a switch statement, is any case not terminated by break or
return?
Do all switch statements have adefault branch?
Are all loops correctly formed, with the appropriate initialisation,
increment and termination expressions?
10. Files Are all les properly declared and opened? Is a le not
closed in the case of an error? Are EOF conditions detected and
handled correctly?