True or false: A capacitor stores energy for ½ a cycle and gives it up on the other half, the net energy is zero
FALSE!   But it's a trick question.   (Or, perhaps the author has misconceptions about how capacitors work, and their book has errors?)

Was the answer supposed to be false?   Yet the net energy is actually zero, that part's true.  The question's reasoning is wrong, the number "½" is wrong, so the answer given in the back of the book had better be "false."

It's a subtle point, so perhaps the author is confused and thinks that "1/2" is correct, when it should actually be "1/4."   Or, the author is using a trick question to expose the student's ignorance.

The correct answer is: "one-half cycle is wrong, it's supposed to be 1/4!"

In detail: the capacitor's coulombs and joules are proportional to the potential-diff across its terminals, and note well: for AC sine voltage, this value goes to zero twice per cycle.   In other words, capacitors AREN'T charged on the first half-cycle and discharged on the second.   Instead, they're charged on the first quarter-cycle and discharged on the second quarter-cycle, then the process repeats a second time.  (After the first half-cycle both the energy and the charge are not maximum.  Instead both have returned to zero!)

When a capacitor is connected to a sine AC voltage source, energy moves back and forth between source and capacitor, twice per cycle.  Not once.

Examine the waveform for the positive half-cycle of current: when current starts out at zero, the capacitor voltage is at negative max, and the capacitor is already charged.  During the half-cycle of positive current, the capacitor voltage rises to zero, then rises to positive maximum  ...and when it rises to zero, that's a discharge.  The capacitor discharges in the first quarter-cycle of the positive current pulse. (And then charges opposite during the second quarter-cycle.)