Compactness and Hausdorffness
Solution 1:
A space in which all compact sets are closed is known as a $KC$ space; $T_B$ space is another term that has been used.
A standard example of a compact $KC$ space that is not Hausdorff is the one-point compactification $Q^*$ of the space of rational numbers with the usual Euclidean topology. $\Bbb Q$ is not locally compact, so $\Bbb Q^*$ is not Hausdorff. Let $p$ be the point at infinity in $\Bbb Q^*$, and suppose that $K\subseteq\Bbb Q^*$ is compact. If $p\notin K$, then $K$ is a compact subset of $\Bbb Q$ with the usual topology, so $K$ is closed and compact in $\Bbb Q$, $\Bbb Q^*\setminus K$ is open in $\Bbb Q^*$, and $K$ is therefore closed in $\Bbb Q^*$.
Suppose, then, that $p\in K$. If $K$ is not closed, there is some $x\in(\operatorname{cl}_{\Bbb Q^*}K)\setminus K$. Clearly $x\in\Bbb Q$, and $\Bbb Q$ is open in $\Bbb Q^*$, so $x\in\big(\operatorname{cl}_{\Bbb Q}(K\cap\Bbb Q)\big)\setminus K$, and $K\setminus\{p\}$ is therefore not closed in $\Bbb Q$. There is therefore a sequence $\langle x_n:n\in\Bbb N\rangle$ of distinct points of $K\setminus\{p\}$ converging in $\Bbb Q$ to some $x\in\Bbb Q\setminus K$. Let $C=\{x\}\cup\{x_n:n\in\Bbb N\}$; then $C$ is a closed, compact subset of $\Bbb Q$, so $\Bbb Q^*\setminus C$ is an open nbhd of $p$ in $\Bbb Q^*$. Let $D=\{x_n:n\in\Bbb N\}$; $D$ is a discrete set in $\Bbb Q$, so we can find open sets $U_n$ in $\Bbb Q$ such that $U_n\cap D=\{x_n\}$ for each $n\in\Bbb N$. The sets $U_n$ are also open in $\Bbb Q^*$, so $\{U_n:n\in\Bbb N\}\cup\{\Bbb Q^*\setminus C\}$ is an open cover of $K$ with no finite subcover, contradicting the hypothesis that $K$ is compact. Thus, $K$ must be closed, and $\Bbb Q^*$ is $KC$.
Solution 2:
Another example of a $KC$ space is the real line with the cocountable topology, where the open sets are just the complements of countable sets. An infinite set $A$ contains a countable subset $a_1, a_2, ... $. The cover $U_1, U_2, ...$ where $U_n=\Bbb R-\{a_n,a_{n+1},...\}$, is then an open cover without a finite subcover. This means that $A$ is not compact. In other words, the compact sets in this topology are just the finite ones, so they are closed.
Note that a $KC$ space has unique sequential limits, i.e. a sequence that converges has a unique limit. In a first countable space it can then be shown that the space must be Hausdorff.