C经典程序集锦
集锦一:
#include <stdio.h>
int array[]={23,34,12,17,204,99,16};
#define TOTAL_ELEMENTS (sizeof(array)/sizeof(array[0]))
int main()
{
int d=-1;
int x;
if(d <= TOTAL_ELEMENTS-2)
printf("Hello World.\n");
system("pause");
return 0;
}
TOTAL_ELEMENTS所定义的值是unsigned int 类型......