Two different ones:
(1)
C
style
nclude <stdio.h>
void slash_to_blank(char * s)
{
for (; *s; ++s)
{
*s = (*s == '/') ? ' ' : *s;
}
}
int main()
{
char d[] = "11/07/20";
slash_to_blank(d);
printf("%s\n", d);
return 0;
}
(2)
C++
style
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
char d[]{"11/07/20"};
replace_if( begin(d), end(d), [](char c){return c=='/';}, ' ');
cout << d << endl;
}