I'm trying to scan a line from a data file(txt format) it just contains a line of ints ex.
3457983257892
I need to scan the line and get the total number of individual ints.
Basically, 34563456 would total to 8. I'm not sure how to manipulate a while loop using fscanf and increment variable i. I think its that simple but it keeps core dumping.
What I have so far.
i = 0;
while(fscanf(dFile, "%1d")!= EOF) {
i++
}