Is there a way to control how scanf() separates input?
scanf("%10s %10s", array1, array2);
The above works fine, separating by space. But, can I use a different separation signal?
Because neither of these seem to work if I want to splice input with a comma rather than a space:
scanf("%10s,%10s", array1, array2);
scanf("%10s, %10s", array1, array2);
What gives? A book I am reading claims that one can separate input with scanf() using any character, but fails to explain how to do so. Furthermore, if alternate characters can be used, can a broader criteria than a single character be used, too? (i.e. value types, statements, etc.)