美文网首页
array initialization is not 0

array initialization is not 0

作者: Programming | 来源:发表于2017-10-15 18:32 被阅读0次

    #include#define page_size 1<<12

    int main(void)

    {

    int array_size;

    // must be explicit initialized

    char zero_page[page_size];

    array_size = sizeof(zero_page)/sizeof(*zero_page);

    for (int i = 0; i < array_size; i++)

    printf("the value in %dth char array %d\n", i, zero_page[i]);

    }

    相关文章

      网友评论

          本文标题:array initialization is not 0

          本文链接:https://www.haomeiwen.com/subject/bhbcuxtx.html