While, the arguments presented above are intuitively correct, they are not rigorous enough.
Consider the function g(x) = f(x) - x which is also a continuous function.
Now, if either f(0) = 0 or if f(1) = 1, then we are done.
Now, if f0)
0 and f(1)
1, then f(0)>0 and f(1)<1 (Since range of f is [0,1] for the domain [0,1])
i.e. f(0)-0>0 and f(1) -1<0.
i.e. g(0)>0 at x =0 and g(1)<0 at x =1
Since g(x) is continuous, from Bolzano's Theorem also called Intermediate Value Theorem,
g(c) = 0 for some x
[0,1].
This means f(c) - c =0 or f(c) = c