What is an example of a topological space $X$ such that $C,K\subseteq X$; $C$ is closed; $K$ is compact; and $C\cap K$ is not compact?
I know that $X$ can be neither Hausdorff nor finite.
I am interested in this question because I recently read the following definition (in a Rudin book):
If $\left(X,\tau\right)$ is a topological space and $\infty\not\in X$, then $\left(X_\infty,\tau_\infty\right)$, where $X_\infty=X\cup\left\{\infty\right\}$ and every $U\in\tau_\infty$ is such that $U\in\tau$ or $U^c\subseteq X$ is compact, is a topological space.
I believe that this definition requires that $U^c\subseteq X$ be compact and closed.
Edit: The first question was my attempt to show that if $U,V\in\tau_\infty$ are such that $U\in\tau$ and $V^c\subseteq X$ is compact, then $\left(U\cup V\right)^c=U^c\cap V^c$ is not compact. However, this holds, as the comments show. A correct counter-example would be to show that if $U,V\in\tau_\infty$ are such that $U^c,V^c\subseteq X$ are compact, then $\left(U\cup V\right)^c=U^c\cap V^c$ is not compact, as Rob Arthan shows in his answer.