#include <stdio.h>
int main()
{
int y=0;
int a[6];
for(int f=0; f<6; f++)
{
a[f]=f+1;
}
int * ptr1 = &a[0];
int * ptr2 = &a[5];
for(int f=0; f<3; f++)
{
y = *(ptr1+f);
*(ptr1+f) = *(ptr2-f);
*(ptr2-f) = y;
}
for(int f=0; f<6; f++)
{
printf("%d ", a[f]);
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: