QP School

Full Version: Accessing array elements in C
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Elements in an array can be accessed using their index.

int numbers[5] = {10, 20, 30, 40, 50};
printf("%d\n", numbers[2]); // Output: 30