It may sound too basic to even be a question, but I couldn't find a straight answer in Wolfram Alpha, Wolfram Mathworld or Wikipedia. Several other examples of more complicated functions are given.
In Wolfram Mathworld it is written that
A smooth function is a function that has continuous derivatives up to
some desired order over some domain. (…) The number of continuous
derivatives necessary for a function to be considered smooth depends
on the problem at hand, and may vary from two to infinity.
$f(x) = x$ has derivative 1 of the first order and 0 of second order, so I would say based on this it has at least 2 derivatives. I think it also has an infinite number of derivatives which are also 0.
Another page on Wolfram Mathworld says the following:
A $C^{\infty}$ function is a function that is differentiable for all degrees of differentiation. (…) All polynomials are $C^{\infty}$. (…) $C^{\infty}$ functions are also called "smooth" (…).
Since $f(x) = x$ is a polynomial, I'm concluding that the paragraphs above mean it is also smooth.
Best Answer
A function is smooth is it has derivatives of infinite order. $f(x) = x$ is smooth because it has infinitely many derivatives which are all 0, except for the first one. Polynomials are smooth because eventually their derivatives are 0.