[proofplan]
To prove that $S$ is convex, we take two arbitrary minimizers and show that every convex combination of them is again a minimizer. Convexity of the feasible set ensures that the convex combination is feasible. Convexity of the objective gives an upper bound by the common optimal value, while the definition of the infimum gives the reverse inequality for every feasible point.
[/proofplan]
[step:Take an arbitrary convex combination of two minimizers]
Let $x_0, x_1 \in S$, and let $t \in [0,1]$. Define the point $x_t \in V$ by $x_t := (1-t)x_0 + t x_1$. Since $x_0, x_1 \in S \subset C$ and $C$ is convex, we have $x_t \in C$.
[/step]
[step:Use convexity of the objective to bound the value at the convex combination]
Because $f: C \to \mathbb{R}$ is convex and $x_0, x_1, x_t \in C$, we obtain $f(x_t) \leq (1-t)f(x_0) + t f(x_1)$. Since $x_0, x_1 \in S$, the definition of $S$ gives $f(x_0) = p^*$ and $f(x_1) = p^*$. Hence
\begin{align*}
f(x_t) \leq (1-t)p^* + t p^* = p^*.
\end{align*}
[guided]
At this point the previous step has established that the convex combination $x_t := (1-t)x_0 + t x_1$ lies in $C$. We now use convexity of the objective function to get the upper bound on its value.
Convexity of $f: C \to \mathbb{R}$ means that for every $y_0, y_1 \in C$ and every $s \in [0,1]$,
\begin{align*}
f((1-s)y_0 + s y_1) \leq (1-s)f(y_0) + s f(y_1).
\end{align*}
The hypotheses for this inequality are satisfied with $y_0 = x_0$, $y_1 = x_1$, and $s = t$, because $x_0, x_1 \in S \subset C$ and $t \in [0,1]$. Substituting these choices gives
\begin{align*}
f(x_t) \leq (1-t)f(x_0) + t f(x_1).
\end{align*}
Because $x_0$ and $x_1$ belong to the solution set $S$, they both attain the optimal value $p^*$. Thus $f(x_0) = p^*$ and $f(x_1) = p^*$, and substituting these equalities into the preceding estimate yields
\begin{align*}
f(x_t) \leq (1-t)p^* + t p^* = p^*.
\end{align*}
This proves the required upper bound for the objective value at the convex combination.
[/guided]
[/step]
[step:Use optimality of the infimum to force equality]
Since $p^* = \inf_{x \in C} f(x)$ and $x_t \in C$, the defining lower-bound property of the infimum gives $p^* \leq f(x_t)$. Together with the inequality $f(x_t) \leq p^*$, this implies $f(x_t) = p^*$. Since $x_t \in C$ and $f(x_t) = p^*$, we have $x_t \in S$.
[/step]
[step:Conclude that the solution set contains every segment between its points]
We have shown that for arbitrary $x_0, x_1 \in S$ and arbitrary $t \in [0,1]$, the point $(1-t)x_0 + t x_1$ belongs to $S$. Therefore $S$ is convex.
[/step]