enol / capitalize
public c v1 · immutable#include <ctype.h>#include <stdio.h>char *caps (char *s);intmain (int argc, char **argv){ if (argc != 1) printf ("%s\n", caps (argv[1])); return 0;}char *caps (char *s){ char *sp = s; *(sp) = toupper (*sp); for (++sp; *sp; sp++) if (!isgraph (*(sp - 1)) || !isgraph (*(sp + 1))) *sp = toupper (*sp); return s;}