Find the error of the following code segment.
```
int Sum(int x, int y)
{
int result;
result = x + y;
}
```
Error: The method is supposed to return an integer, but does not.
Correction: Delete the method’s body statements and place the statement
return x + y;
in the method, or add the following statement at the end of the method body:
return result;
You might also like to view...
________ Markup view provides a less cluttered view of the document, using red vertical lines to indicate changes and balloons to indicate comments
Fill in the blank(s) with correct word
Pseudocode is
(A) data that have been encoded for security. (B) the incorrect results of a computer program. (C) a program that doesn't work. (D) the obscure language computer personnel use when speaking. (E) a description of an algorithm similar to a computer language.