For (1), x is even implies all x^i are even. S is a sum of even numbers. Therefore S is even.
For (2), there are two cases:
Case 1: x is even, from result of (1), S is even
Case 2: x i odd, implies all x^i are odd. Since n is even and S is a sum of n (even) odd numbers.
Therefore S is even.
In summary, the answer is D