Hi,
When we define any integer array like
int a[3]={1,2,3};
then it will assign the values as a[0]=1, a[1]=2, and a[2]=3
But, when we define any character array as
char a[3]={'a','b'};
then compiler here automatically consider '\0' null character to represent the end of the string
So, my question here is:
As compiler do not needs to use any such terminator to indicate that the int array or float array is terminated. Then, why compiler needs to assign '\0' null terminator in char array & why not in others?