When I initialize a char array like char str1[] = {'a','b','c'} (array size is not set) and finding it's length using loop until str1[i] != '\0', I get length = 4. In contrast, when I initialize like char str2[10] = {'a','b','c'} (array size is set) and finding the length using using same way, I get length = 3. Why str1[3] contains a garbage value but not in str2[3]?