This may be a silly question, but I'm struggling to solve this problem. I know that to append a char to a string I can do something like this:
char c;
char string[10] = "";
strcat(string, &c);
Now, this works well for char variables, but the problem is that when I try to append a char from an array:
char array[5];
char string[10] = "";
strcat(string, &array[0]); //&array[0] returns the entire array, not just array[0]
Question: How can I append a single char from an array to a string?
strcatrequires a null-terminated string for its second argument.