Let $\mathbb{R}^\mathbb{R}$ be the set of function from $f : \mathbb{R} \rightarrow \mathbb{R}$ and $C(\mathbb{R})$ the subspace of continuous functions. I want to show that $C(R)$ is dense in $\mathbb{R}^\mathbb{R}$.
I think we can do something like this. Since $\mathbb{R}^\mathbb{R}$ has product topology, if $U = \prod U_\alpha$ is a neighborhood of $f$ then finitely many $U_\alpha$ are not $\mathbb{R}$. There must be therefore be $U_i = \mathbb{R}$ between $U_\alpha \neq \mathbb{R}$'s where this is not true. Then somehow we should choose $g(x_i) \in U_i$ to make the $g \in U$ continuous (i.e. we have free range over $g$ for the $U_i = \mathbb{R}$)?
Is it then true that for all $f$ there is some sequence of continuous functions $\{f_n\}$ that converge to $f$ pointwise?
Am I on the right track? Can anyone help me formalize this argument? Thanks in advance.
Note that there's no need to think about sequences of functions. You just need to show that in your arbitrary open set $U$, there is some continuous function $g$.
Barring that, if I understand you, it seems to me like you're on the right track; to show density, you need only find a continuous function $g:\mathbb R \to \mathbb R$ in your open set $U$, i.e. such that $g(x_i) \in U_i$ for each $i$. Since there are only finitely many $x_i$ to worry about, this is definitely possible. Just pick a point $y_i\in U_i$ for each $i$ and find a continuous $g$ such that $g(x_i) = y_i$. You are correct in saying you have free range to set the values of $g$ to be whatever you want away from the $x_i$, so you have many options for $g$. You could pick $g$ to be a polynomial, for instance, or piecewise linear.