아래 코드에 문제가 있습니다 ... 누군가 내게 설명 할 수있는 이유는 무엇이며 그 이유는 무엇입니까?다음 코드의 배열이 인쇄되지 않게하는 원인은 무엇입니까?
#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;
}
'TOTAL_ELEMENTS' 부호 (예 : 서명이 오래 오래),'거라고 <= (TOTAL_ELEMENTS-2)'비교한다 서명되지 않은. – BLUEPIXY