#include <stdio.h>

int main(void) {
    // Initialize the array correctly
    int a[] = {1, 2, 3, 4, 5, 6, 7, 8};
    int *p;
    p = a;  // Assign the address of the first element of the array to the pointer

    printf("%d\n", p[5]);         // Print the sixth element (6)
    printf("%d\n", p[0] + 1);     // Print the first element + 1 (1 + 1 = 2)
    printf("%d\n", p[2] + 2);     // Print the third element + 2 (3 + 2 = 5)

    p = &a[3];  // Assign the address of the fourth element of the array to the pointer
    printf("%d\n", p[3] + 1);     // Print the seventh element + 1 (7 + 1 = 8)
    printf("%d\n", p[4] + 1);     // Print the eighth element + 1 (8 + 1 = 9)

    return 0;
}
