Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

recursive sentence reverse [C]

Name: Anonymous 2013-08-14 20:16

how is my solution, /prog/-kun?

void
putwd(char *s)
{
        while (*s && !isspace(*s))
                putchar(*s++);
        putchar(' ');
}

char *
cdr(char *s)
{
        while (*s && !isspace(*s))
                ++s;
        while (isspace(*s))
                ++s;
        return *s ? s : NULL;
}

void
rprint(char *s)
{
        if (cdr(s))
                rprint(cdr(s));
        putwd(s);
}

int
main(void)
{
        rprint("anus my hax");
        putchar('\n');
        return 0;
}

Name: Anonymous 2013-08-15 4:17

>>11
Claim rejected. Working within the standard is a pointless endeavor that constrains programmers from achieving true works of greatness. If the compiler accepts it, it's good enough.

You are dismissed, as are your antiquated notions of standards and similar ilk.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List