That's a good one, bacon. The hardest part is getting the ascii math right.
You can even make it simpler (I like to make things as simple as possible):
Code:
int main()
{
char *p = "8790278573";
int s = 0;
while (*p)
s += *p++ - '0';
cout << "sum " << s << endl;
}