为什么这个程序可以运行且是对的

问题遇到的现象和发生背景

首先,我输入hello的话,取的strlen值应该是6,然后我赋值给len,则len=6,然后我让c[len+1]赋值'\0',按理说应该是c[7]='\0',结果输出确实对的,这是为什么啊,用的vs2022

问题相关代码,请勿粘贴截图
#include <stdio.h>
#include <string.h>
int main()
{
    char c[100],b[100];
    gets(c);
    int len = strlen(c);
    c[len+1] = '\0';
    int i, j;
    for (i = strlen(c)-1,j=0;i >= 0;i--,j++)
    {
        b[j] = c[i];
    }
    b[j] = '\0';
    int result = strcmp(c, b);
    if (result < 0) {
        printf("%d\n", -1);
    }
    else if (result > 0)
    {
        printf("%d\n", 1);
    }
    else {
        printf("%d\n", 0);
    }
    return 0;
}

运行结果及报错内容

hello
-1

我的解答思路和尝试过的方法
我想要达到的结果
虽然c[7]='\0',但是strlen(c)还是6啊,i=strlen(c)-1初始值还是5
字符串的长度是到第一个\0截止的