Computer Science : Post-Conditions

Example Questions

Example Question #41 : Program Analysis

double square(double n){

return n*n;

}

What MUST be true immediately after the above code snippet has run?

The result will be a positive number.

The result will be a negative number.

The result will be stored in a new variable.

It is impossible to tell.

The value of the input parameter changes.