Code:
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
int i = 0, A[10];
printf("Input a set of up to 10 integers separated by a space to store in Array A: ");
fflush(stdout);
for(i = 0; i<10; i++)
{
scanf("%d", &A[i]);
printf( "%d", &A[i]);
fflush(stdout);
}
return 0;
}
Input a set of up to 10 integers separated by a space to store in Array A: 1 2 3 4 5
6422048 6422052 6422056 6422060
Why is the array coming back as 6422048 for every input i put in. Im trying to create two arrays with up to ten variables, apparently struggling with just one.