home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 241,431 of 243,242   
   Rosario19 to All   
   the index of one array that can not over   
   23 Oct 25 20:39:12   
   
   From: Ros@invalid.invalid   
      
   here the unsigned chars are 8 bit unsigned...   
   here the index i it seems always definited from 0 to 255   
   and so it is always definited a[i], but one can make errors the same   
   in other places...   
      
      
   #include    
      
   main(void)   
   {unsigned char a[258]="0123456789", i;   
    unsigned c;   
    for(c=i=0;c<500;++c,++i)   
        printf("%c",a[i]);   
    printf("\n");   
    return 0;   
   }   
      
   result   
      
   C:\>index   
   0123456789   
   0123456789   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca