Of course not. You don't have a Null terminator at the end of your string. So strlen will go off searching through memory until it finds one.
if you wrote:
Code:
char arr[6]={'a','b','c','d','e', '\0'};
That should work.
Quantumpete
"No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
"Have you tried turning it off and on again?" - The IT Crowd