#include <stdio.h>
#include <string.h>
void foo(int num)
{
int array[num];
printf("inside foo(): sizeof(array) is %u! oh, mother fucking god!\n", sizeof(array
)); }
void bar(int num)
{
int array[num];
memset(array
, 0x55, sizeof(array
)); }
int main(void)
{
const int num = 16777216;
foo(num);
bar(num);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCnZvaWQgZm9vKGludCBudW0pCnsKICAgIGludCBhcnJheVtudW1dOwogICAgcHJpbnRmKCJpbnNpZGUgZm9vKCk6IHNpemVvZihhcnJheSkgaXMgJXUhIG9oLCBtb3RoZXIgZnVja2luZyBnb2QhXG4iLCBzaXplb2YoYXJyYXkpKTsKfQoKdm9pZCBiYXIoaW50IG51bSkKewogICAgaW50IGFycmF5W251bV07CiAgICBwcmludGYoImluc2lkZSBiYXIoKVxuIik7CiAgICBtZW1zZXQoYXJyYXksIDB4NTUsIHNpemVvZihhcnJheSkpOwp9CgppbnQgbWFpbih2b2lkKQp7CiAgICBzZXR2YnVmKHN0ZG91dCwgTlVMTCwgX0lPTkJGLCAwKTsKICAgIAogICAgY29uc3QgaW50IG51bSA9IDE2Nzc3MjE2OwoKICAgIHByaW50ZigiYmVmb3JlIGZvbygpXG4iKTsKICAgIGZvbyhudW0pOwogICAgcHJpbnRmKCJhZnRlciAgZm9vKClcbiIpOwoKICAgIHByaW50ZigiYmVmb3JlIGJhcigpXG4iKTsKICAgIGJhcihudW0pOwogICAgcHJpbnRmKCJhZnRlciAgYmFyKClcbiIpOwoKICAgIHJldHVybiAwOwp9Cg==