P
prasoonthegreat
Look at the following code....
#include<stdio.h>
#define TOTAL_ELEMENTS (sizeof(array) / sizeof(array[0]))
int array[] = {23,34,12,17,204,99,16};
int main()
{
signed int d;
printf("Total Elements in the array are => %d\n",TOTAL_ELEMENTS);
for(d=-1;d <= (TOTAL_ELEMENTS-2);d++)
printf("%d\n",array[d+1]);
printf("Did u see the output..");
return 0;
}
Why is the for loop not running even once even though the value of
TOTAL_ELEMENTS is 7....
Prasoon
#include<stdio.h>
#define TOTAL_ELEMENTS (sizeof(array) / sizeof(array[0]))
int array[] = {23,34,12,17,204,99,16};
int main()
{
signed int d;
printf("Total Elements in the array are => %d\n",TOTAL_ELEMENTS);
for(d=-1;d <= (TOTAL_ELEMENTS-2);d++)
printf("%d\n",array[d+1]);
printf("Did u see the output..");
return 0;
}
Why is the for loop not running even once even though the value of
TOTAL_ELEMENTS is 7....
Prasoon