The answer is yes. Let $\kappa$ be any singular [strong limit cardinal](http://cantorsattic.info/Strong_limit#strong_limit_cardinal) of uncountable cofinality, such as the cardinal $\beth_{\omega_1}$ for a specific example, and let $X=\kappa+1$, the ordinals up to and including $\kappa$ itself. Under the order topology, this is a compact Hausdorff space. Note that $|X|=\kappa\neq 2^\alpha$ for any $\alpha$, since $\kappa$ is a strong limit cardinal. But meanwhile, every continuous function $f:X\to\mathbb{R}$ is eventually constant, in order that it is continuous at the final point $\kappa$, because it has uncountable cofinality. So every function in $C(X)$ is determined by a restriction of it $f\upharpoonright\gamma:\gamma\to\mathbb{R}$ for some $\gamma\lt\kappa$. Since $\kappa$ is a strong limit, there are only $\kappa$ many such restricted functions, and so $|C(X)|=\kappa=|X|$, as desired.