08.11.2010, 20:03
When you have for example 4 chars in the string (the part you see), like "Luka", it is actually 5 chars because compiler converts the code to "Luka\0", to end the string. So if you're using s[5] you can only get 4 chars, not 5 (actually you get 5 chars, but the last one is string terminator).