Card 0 of 1
double square(double n){
return n*n;
}
What MUST be true immediately after the above code snippet has run?
Squaring a real number will always produce a positive number. The result does not have to be stored in a new variable; it could be a value that is only needed for a one-off expression, thus, not worthy to be stored in memory. Lastly, since the input was passed by value and not by reference, its initial value will stay the same.
Compare your answer with the correct one above