Four battery packs need one capacity total. Start your pointer at the first element, read it, and advance to the next. On the last pass, advancing produces a one-past-end pointer, which is allowed, but never dereference it. The loop needs exactly four reads.
packs array; use a four-pass loop to add *pointer to total and advance the pointer; print Capacity: 18 with a newline. Do not hard-code the total.Start int *cursor = packs; add *cursor, then increment cursor after each valid access.