35. Let $f(x)=x^{2}+a x+b \cos x$, find all pairs of real numbers $(a, b)$, such that the equation $f(x)=0$ and $f(f(x))=0$ have the same and non-empty set of real solutions.
35. Let $\alpha$ be a common real root of $f(x)=0$ and $f(f(x))=0$, then $f(\alpha)=0$, and $f(f(\alpha))=f^{2}(\alpha)+a \cdot f(\alpha)+ b \cos (f(\alpha))=b=0$, thus $f(x)=x^{2}+a x$.
1) When $a=0$, $f(x)=x^{2}, f(x)=0$ has the solution set $\{0\}, f(f(x))=f\left(x^{2}\right)=x^{4}=0$ has the solution set $\{0\}$.
Therefore, $a=0$ satisfies the condition.
2) When $a \neq 0$, $f(x)=0$ has the solution set $\{0,-a\}$, and $f[f(x)]=\left(x^{2}+a x\right)^{2}+a\left(x^{2}+a x\right)=0 \Leftrightarrow\left(x^{2}+a x\right)\left(x^{2}+a x+a\right)=0$.
Thus, $\left\{x \mid x^{2}+a x+a=0\right\} \subseteq\{0,-a\}$.
By $0^{2}+0 \cdot a+a=0$, then $a=0$, which is a contradiction.
By $(-a)^{2}+a \cdot(-a)+a=0$, then $a=0$, which is a contradiction.
Therefore, the equation $x^{2}+a x+a=0$ has no real roots, so $\Delta=a^{2}-4 a<0 \Leftrightarrow 0<a<4$.
Thus, $0 \leqslant a<4$.
In summary, the set of all real number pairs is $\{(a, b) \mid 0 \leqslant a<4, b=0\}$.