Thread: Arrays's

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    12

    Arrays's

    Hi, im trying to understand, HOW the HELL does a become i, in this line of code, someone please exlain what a[i] comes from..

    i cannot make sense of this, and its stopping my work.

    /* fill array */
    for (i=0; i < MAX; i++)
    {
    a[i]=rand();
    printf("%d\n",a[i]);
    }

    theres an int called i

    and an array called a[5] but where does a[i] come from??????

    thanks

    im confused

    the shortlink is here http://computer.howstuffworks.com/c4.htm

    thanks

    greg

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,792
    Dont crosspost..

    All replies to the C Programming Board

Popular pages Recent additions subscribe to a feed