Clarification of size of array

Here, why we are taking j as n-1 as at n-1, it will be ‘\0’? Shouldn’t be j=n-2?

The starting index of the string will be 0 and the last index is n-1.
keep in mind that the ‘\0’ is not included in the length if the string.
So j must be n-1