Close
#include <stdio.h>
#include <string.h>

int main(int argc, char *argv[])
{
  char *s = (argv[1] == NULL) ? "argument. an provide Please, ": argv[1];
  size_t l = strlen(s);
  char *p = s+l-1;
  char *t;

  while (p-- >= s)
  {
    while (*p != ' ' && (t = --p) >= s);

    while (p++ < s+l-1)
      if (*p != ' ')
        putchar(*p);
      else {
        --p;
        break;
      }

    putchar(' ');
    p = t;
  }

  putchar('\n');
  return 0;
}