#include<stdio.h>
int main(void) {
int arr[7];
int i;
int copy[7];
int j;
int *ptr_copy;
int *ptr_arr;
ptr_arr=&arr[0];
ptr_copy=©[0];
printf("Enter 7 Element In the Array");
for(i=0;i<7;i++)
scanf("%d",&ptr_arr[i]);
printf("\n");
for(i=7,j=0;i>=0;i--,j++)
ptr_copy[j]=ptr_arr[i];
for(i=0;i<7;i++)
ptr_copy[i]=ptr_copy[i]*-1;
printf("%d",ptr_copy[i]);
}
In the last loop I thought if I multiply the loop by -1 all the numbers' signs will change, is that correct? And in the last loop I'm not sure if it's correct. Could you help me and tell me where is the mistake?