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;
}
why there is no output for this program.
yep, you can. You have to see a #define as some text that will be substituted BEFORE compiling (that's why they're called PRE-processor directives)
#define MYWORD ANYTEXTIWANT
then all text like "MYWORD" found along the code will be substituted by "ANYTEXTIWANT" before compiling, so what the compiler will have tu understand is "ANYTEXTIWANT"...
conclusion: you can make any define you want, but keep in mind that the text you substitute will have to have sense in the code piece it's inserted