Answer:
False. Never reach across a load when you're trying to lift it.
I believe that's b, i'm not 100% sure though
HTML form fields? It is best practice to use descriptive names and use a consist naming convention. My person preference is to use CamelCase, but some ppl prefer to use hyp-hens or under_scores. For example, FirstName, LastName, CellPhone, etc.
Answer:
// Assume that all variables a, n, temp have been declared.
// Where a is the array, n is the array length, temp is a temporary
// storage location.
// Cycle through the array a.
// By the time the loop gets halfway,
// The array would have been reversed.
// The loop needs not get to the end of the array.
// Hence, the loop ends halfway into the array i.e n/2.
for (int k = 0; k < n / 2; k++) {
// Swap first and last, second and next-to-the-last and so on
temp = a[k];
a[k] = a[n - k - 1];
a[n - k - 1] = temp;
}
Explanation:
Explanation has been given in the code in form of comments. Please go through the comments in the code carefully.
Hope this helps!