Answer:
-------------------------######################
In the C programming language, you can't determine the array size from the parameter, so you have to pass it in as an extra parameter. The solution could be:
#include <stdio.h>
void swaparrayends(int arr[], int nrElements)
{
int temp = arr[0];
arr[0] = arr[nrElements - 1];
arr[nrElements - 1] = temp;
}
void main()
{
int i;
int myArray[] = { 1,2,3,4,5 };
int nrElements = sizeof(myArray) / sizeof(myArray[0]);
swaparrayends(myArray, nrElements);
for (i = 0; i < nrElements; i++)
{
printf("%d ", myArray[i]);
}
getchar();
}
In higher languages like C# it becomes much simpler:
static void Main(string[] args)
{
int[] myArray = {1, 2, 3, 4, 5};
swaparrayends(myArray);
foreach (var el in myArray)
{
Console.Write(el + " ");
}
Console.ReadLine();
}
static void swaparrayends(int[] arr)
{
int temp = arr[0];
arr[0] = arr.Last();
arr[arr.Length - 1] = temp;
}
<span>Which statement is true regarding bitmap images?</span>
I believe it is D
The 10 highest-paying jobs you can get without a college degree all pay more than $79,000 those are Commercial pilots.
Detectives and criminal investigators. ...
Powerhouse, substation, and relay electrical and electronics repairers. ...
Elevator installers and repairers. ...
Power plant operators. ...
Media and communication equipment workers. ...
Typically, "Del" stands for "delete."
Most times, this key will do different things depending on the type of keyboard/computer you have. For example, on macs, the "delete" key is also the backspace key, so it will delete the last character you typed. However, on most pcs, the "delete" key will delete characters you typed that are in front of your cursor.