size of array

why we take big size of array than the size required in question.
for example if in question maximum size of string will be 10000. then we take char s[10005] or char s[10001] etc.

In case maximum size is 10000, we need to take size 10001 so as to take care of null character in the string.
Actually, we can take it anything greater than 10000.So ,both 10005 or 10001 will suffice.