Let\'s say I have an integer called \'score\', that looks like this:
int score = 1529587;
Now what I want to do is get each digit 1, 5, 2,
Don't reinvent the wheel. C has sprintf for a reason. Since your variable is called score, I'm guessing this is for a game where you're planning to use the individual digits of the score to display the numeral glyphs as images. In this case, sprintf has convenient format modifiers that will let you zero-pad, space-pad, etc. the score to a fixed width, which you may want to use.