gpt4 book ai didi

c - 为什么我的 C 程序不打印数组值?

转载 作者:太空狗 更新时间:2023-10-29 16:03:53 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
A riddle (in C)

 #include<stdio.h>

#define TOTAL_ELEMENTS (sizeof(array) / sizeof(array[0]))
int array[] = {23,34,12,17,204,99,16};

int main()
{
int d;

for(d=-1;d <= (TOTAL_ELEMENTS-2);d++)
printf("%d\n",array[d+1]);

return 0;
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com