All pastes #1195930 Raw Edit

VLA test

public cpp v1 · immutable
#1195930 ·published 2008-09-06 22:05 UTC
rendered paste body
int f(unsigned x, unsigned y){        int buf[x];        for (unsigned i = 0; i < x; ++i) {                buf[i] = i % y;        }        int result = 0;        for (unsigned i = 0; i < (x - 1); ++i) {                result += buf[i] % (buf[i + 1] + 1);        }        return result;}int main(int argc, char** argv){        return f(1024 * argc, argc);}