Bjarne Stroustrup (C++ creator) once said that he avoids \"do/while\" loops, and prefers to write the code in terms of a \"while\" loop instead. [See quote below.]
S
consider something like this:
int SumOfString(char* s) { int res = 0; do { res += *s; ++s; } while (*s != '\0'); }
It so happens that '\0' is 0, but I hope you get the point.