What it means for a software element to be correct:
To consider this question meaningful, you need not only the program but also a precise description of what it is supposed to do — a specification.
Correctness property: Correctness is a relative notion: Software elements are correct when they are consistent with their specifications.
We express such specifications through assertions.
Note that OOSC’s assertions are more than C’s “assert(p)” macro call (enabled by #include <assert.h>):
[C’s assert(p) tests whether a certain condition p holds at a point in the software’s execution. If p is true, assert does nothing; if p is false, it calls exit() to halt the program.]