Let's assume I want to build myself a c like "string". Why does this code not throw an error when I assign array[6]? Does char array[6] not give me index 0-5? Has this something to do with stack vs heap?
#include <stdio.h>
#include <stdlib.h>
int main()
{
char array[6];
array[6]='\0';
if (array[6]=='\0'){
printf("yes");
}
else printf("no");
return 0;
}