I am trying to replace a certain character in a string with a space using the following code line:
str[i] = \" \";
How can realize this wit
Single char literals are obtained with single quotes:
char
str[i] = ' ';
A literal with double-quotes is a full string literal (a null-terminated array of char), but you're only replacing a single char.