What's stored after the end of character array? I was assuming there would be some random garbage but it did not print anything after the end while looping 10 times.
char a[] = "Pencil";
int i;
for (i = 0; i < 10; i++)
{
printf("%c", a[i]);
}
so the character array a has the size of 7. And for loop looped until 10th position which are 3 more values looped through. But it did not print anything or Error. What's going on here?