7.9k views
5 votes
​What statement is required in the function getSquarePerimeter to assign a value to the variable p in the following statement?​p = getSquarePerimeter(side);

A. ​releaseB. ​returnC. ​assignD. ​set

1 Answer

5 votes

Answer:

B (return)

Step-by-step explanation:

The function getSquarePerimeter is written to calculate the perimeter of a square making use of the sides of the square as argurments. The function carries out it's job and it is expected to return a value (in this case the computed square) this can only be acheived by using the return statement.

User Satish Singh
by
8.3k points