I've been trying to figure where I'm going wrong but I can't seem to point out where my error is exactly.
I'm trying to read from my text file, these integers
5 2 4 9 10 1 8 13 12 6 3 7 11
into an array A. To make sure it works, I was trying to print A but only getting large random numbers instead. Can someone help me see where i'm going wrong please?
int main(){
FILE* in = fopen("input.txt","r");
int A[100];
while(!feof(in)){
fscanf(in, "%s", &A);
printf("%d", A)
}
fclose(in);
return 0;
}
*this is just the main parts of the code related to the question