Examlex

Solved

Select the Statement That Reveals the Logic Error in the Following

question 99

Multiple Choice

Select the statement that reveals the logic error in the following method. public static double minimum(double[] data)
{
Double smallest = 0.0;
For (int i = 0; i < data.length; i++)
{
If (data[i] < smallest)
{
Smallest = data[i];
}
}
Return smallest;
}


Definitions:

Operating Activities

Activities that relate to the primary operations of a company, such as sales, supply, production, and administrative services.

Salaries

Regular payments made to employees for their services, typically expressed as an annual sum but paid in regular installments.

Statement of Cash Flows

A financial report that shows cash inflows and outflows from operating, investing, and financing activities over a specific period.

Indirect Method

Refers to a way of creating the statement of cash flows where net income is adjusted for non-cash transactions, expenses, and changes in working capital.

Related Questions