Im not sure what Ive done wrong but I'm trying to display my array but the program keeps ending so I cant see if its actually working. Im sure its a little mistake - Any help or suggestions will be appreciated.
# include <stdio.h>
# define MAX 100
int main(void)
{
int array[MAX],i,n;
printf("\n Enter Array Size: ",MAX);
scanf("%d", &n); //Allows user to choose Array Size
for(i = 0; i < n; i++)
{
printf("\n Enter %d value: ",i+1);
scanf("\n%d", &array[i]); //Allows user to enter values into array
}
printf("%d",&array[i]); //Trying to display the array but program keeps ending not sure what Im doing wrong.
return 1;
}
Thanks
TrueCoding