I am currently learning C and have come across an issue I cannot find an answer anywhere. Basically I want an input of 10 digits (all in one singular input) and scan each number into an array.
Let me clarify a little more with the code:
int i, a;
printf("Please enter the 10 digits (sith spaces in between) (Y Y M M D D X X X X) : ");
for (i=0; i<N; i++)
Basically I want the user to input 10 digits and then have those numbers scanned into an array. I don't want to do it the easy way of having the user type 1 digit at a time followed by hitting the enter key every time.
However this code of mine gives a "segmentation fault." So I assume I'm doing something wrong.
Any help appreciated!