#include<stdio.h>
#include<stdlib.h>
void init(int data[],int arr[],int size) {
for (int i = 0; i < size ; ++i) {
arr[i] = data[i];
}
printf("\n");
}
void empty(int arr[],int size) {
for (int i = 0; i < size ; ++i) {
arr[i] = 0;
}
printf("\n");
}
void reverse(int arr[],int n) {
int i, j;
int tmp;
for (i = 0, j = n - 1; i < j; i++, j–)
{
tmp = arr[i];
arr[i] = arr[j];
arr[j] = tmp;
}
printf("\n");
}
void print(int arr[], int size) {
for (int i = 0; i < size; ++i) {
printf("%d “, arr[i]);
}
printf(”\n");
}
int main() {
int data[10] = {1, 2, 3, 4, 5, 6, 34, 8, 9,10 };
int arr[] = { 0 };
init(data,arr, 10);
print(arr, 10);
reverse(arr, 10);
print(arr, 10);
empty(arr,10);
print(arr, 10);
system(“pause”);
return 0;
}