Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 
avatar of emil

emil

emil has asked 0 questions and find answers to 7 problems.

Stats

357
EtPoint
147
Vote count
0
questions
7
answers

About

int
main(int argc, char *argv[])
{
    char P[30000], *L[32], *p = P, *s, **l = L;

    bzero(p, sizeof(P));
    for(s = argv[argc - 1]; *s; s++)
        switch(*s){
            case '>': p++; break;
            case '<': p--; break;
            case '+': ++*p; break;
            case '-': --*p; break;
            case '.': write(1, p, 1); break;
            case ',': read(0, p, 1); break;
            case '[': *l++ = s; break;
            case ']': l--; if(*p)s = *l - 1; break;
        }
    return 0;
}