/***************************************************************************** * array1.c * Matthew Chartier * CS50/CSCI E-52 * * Declares an array of ints of length 6 and allows user to query contents. *****************************************************************************/ #include #include int main (int argc, char *argv[]) { int numbers[6] = {4, 8, 15, 16, 23, 42}; int index; // forever... while(true) { printf("Index: "); index = GetInt(); printf("numbers[%d] == %d\n", index, numbers[index]); } }