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;
}
Answer:
The answer is letter C
Explanation:
Systems used by many providers require customers to share bandwidth with neighbors
<span>It is false that live preview is available on a touch screen. Life preview refers to cameras mostly, and to the fact that its display screen can be used as a viewfinder. Viewfinder is what you look through when you are using a camera to take a photo, or to focus on something. So, no, touch screen devices do not have this feature available, only the "old-school" cameras do.</span>
<span>Validation of electronic signatures was designed to encourage a paperless society.</span>
A.Information on social networking sites can give most or all digits of a person’s social security number.