A string in C consists of an array of characters. For a line to be printed correctly using printf calls, it must be interrupted by the NULL character (\ 0).
, .. , , NULL , NULL . , .
char str[100];
char new_char = 'a';
int i = 0;
...
while(str[i] != '\0')
{
++i;
}
str[i++] = new_char;
str[i] = '\0';
user191776