to get the number into a string format. Then just "walk" the charArrayName char by char, and add up the values as you go (into an integer variable). For your answer, remember to show it using %d, and not %c.
(Each char needs the value of '0' subtracted from it, to get it's integer equivalent, as Jonsca nicely noted, above. )
There are other ways: such as peeling off each digit one at a time, but they are not quite as simple.
If you aren't familiar with fgets() yet, check it out - it can be very useful in all kinds of programs.