All pastes #839821 Raw Edit

greenberet

public text v1 · immutable
#839821 ·published 2007-12-31 06:56 UTC
rendered paste body
 //The expected output of the following C program is to print the elements in the array. Whats wrong with this code????

  #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; 
      
       }