No, I understand. You just don't seem to understand what the term 'global' means. A 'global' variable is a variable that has been declared outside of all functions. This is an example of a global integer:
Code:
#include<stdio.h>
int x; /* x is global, as in, it's declared outside of any function */
int main( void )
{
x = 10; /* It is global, and available to functions in the same scope. */
printf("x is %d\n", x );
return 0;
}
Also, again, your array will not have the value 256 in it, because arrays start at 0 and range through size-1. Thus, if you have an array like so:The only values you'll get, if you put the value of the index in the variable, is 0 through 9. Not 10.
Quzah.