I just noticed, in a string with a length divisible by 4, the xor'ing will cancel itself out.
Sidoh -- It depends on what the assignment was. I usually mark the code itself, which would do well (except for the fact that he's using a string where a char[] would do
. The actual algorithm is rather flawed.
And Joe -- there's better ways to learn, but as long as you're having fun, oh well