Q:

Write a program that swaps values within an array

This is for homework
Here is my program 
#include <stdio.h>
void swap (int *a  , int *b  , int *c  ,  int *d  ,  int *e ) {
    int temp1 = a;
    a = b;
    b = temp1;

    int temp2 = b;
    c = d;
    d = temp2;

    int temp3 = e
    e = a;
    a = temp3;
}

void swap (int *a  , int *b  , int *c  , int *d  , int *e );
int main(void)
{
    int arr[15] = {0};
    int i;
    int a = arr[0], b = arr[7], c = arr[8], d = arr[3], e = arr[14];

    printf("Enter 15 integers\n");
    for(i = 0; i < 15; ++i) {
        scanf("%d" , &arr[i]);
        //printf("The ints are %d " , arr[i]); checked if all the ints were recorded
    }
    swap(a, b, c, d, e);
    printf("Swapped array:\n %d" , arr[i]);

    return 0;
 }

So The program is asking me to have the user enter 15 integers. The function would have to swap the 1st integer entered (arr[0]) with the seventh integer entered (arr[7]). Then swap the 8th with the 3rd, then swap the last one with the first. My program complies but gives a handful of warnings and when I try to print my swapped array, all I get is a value of 0. Any help would be appreciated!
Edit
Sorry I heard from someone to not worry about the warnings- counter-intuitive to listen. The warnings are:
[In the function]
assignment makes pointer from integer without a cast
initialization makes integer from pointer without a cast
In main 
passing argument [numbers] of swap makes pointer from integer without a cast  

A:

There's several problems with your code.
First, the swap function doesn't work. You're swapping the values of the pointers that are local variables inside the function, you're not swapping the array elements they point to. You need to indirect through pointers to get the values.
int temp1 = *a;
*a = *b;
*b = temp1;

And similar for all the other pairs you're swapping.
Second, swap expects pointers as arguments, but you're passing int variables from main(). You need to use pointer variables, which you set to the addresses of the array elements:
int *a = &arr[0], *b = &arr[7], *c = &arr[8], *d = &arr[3], *e = &arr[14];

You might consider changing the swap() function so it just takes two pointers, and call it 3 times to do all 3 swaps.
Finally, to print the array, you need to print the elements in a loop:
printf("Swapped array: ");
for (i = 0; i < 15; i++) {
    printf("%d ", arr[i]);
}
printf("\n");

