Answer:
A trial balance will not balance if both sides do not equal, and the reason has to be explored and corrected.
Explanation:
The debit side and the credit side must balance, meaning the value of the debits should equal the value of the credit
Answer:
B) computeValue(10);
Explanation:
Given
Header: void computeValue(int value)
Required
Determine the valid call
To call a function from another function or from the main, the following syntax has to be used.
<em>function-name(parameter-1, parameter-2, parameter-3,.....,parameter-n);</em>
<em />
In the function header given:, the following can be observed:
- The function name is computeValue
- It has only one parameter and it is of type integer
So, to call the function; we make use of computeValue(10);
Where 10 represents the value of the parameter (i.e. argument)
B) For Military Purposes but around the 1970s they became widely available to consumers.
Answer:
True
Explanation:
for loop is used to repeat the process again and again until the condition not failed.
syntax:
for(initialize; condition; increment/decrement)
{
Statement
}
But we can omit the initialize or condition or increment/decrement as well
the syntax after omit the initialization,
for( ; condition; increment/decrement)
{
Statement
}
The above for loop is valid, it has no error.
Note: don't remove the semicolon.
You can omit the condition and increment/decrement.
and place the semicolon as it is. If you remove the semicolon, then the compiler show syntax error.
Answer:
Option 1: May crash at runtime because it can input more elements than the array can hold
Explanation:
Given the code as follows:
- int[] a = {1, 3, 7, 0, 0, 0};
- int size = 3, capacity = 6;
- int value = cin.nextInt();
- while (value > 0)
- {
- a[size] = value;
- size++;
- value = cin.nextInt();
- }
From the code above, we know the <em>a</em> is an array with six elements (Line 1). Since the array has been initialized with six elements, the capacity of the array cannot be altered in later stage.
However, a while loop is created to keep prompting for user input an integer and overwrite the value in the array started from index 3 (Line 4- 9). In every round of loop, the index is incremented by 1 (Line 7). If the user input for variable <em>value</em> is always above zero, the while loop will persist. This may reach a point where the index value is out of bound and crash the program. Please note the maximum index value for the array is supposedly be 5.