Examlex

Solved

The Following Function Should Swap the Values Contained in Two

question 14

Multiple Choice

The following function should swap the values contained in two integer variables, num1 and num2. What, if anything, is wrong with this function?
Void swap(int num1, int num2)
{
Int temp = num2;
Num2 = num1;
Num1 = temp;
}


Definitions:

Carrying Amount

The book value of an asset as recorded in an entity's financial statements, calculated as the original cost minus accumulated depreciation or amortization.

Bonds Issued

A financial instrument representing a loan made by an investor to a borrower, typically corporate or governmental, where the issuer commits to paying back the principal along with interest at a specified future date.

Straight-Line Method

A depreciation method that allocates an equal amount of the cost of an asset to each year of its useful life.

Effective Interest Method

An accounting technique used to allocate the interest expense or income over the life of a financial instrument, reflecting the changing amount of outstanding principal over time.

Related Questions