The Cantor staircase function and related things The Cantor staircase function 
https://en.wikipedia.org/wiki/Cantor_function
has an interesting property: $\{x\colon f'(x)\neq 0\}$ is a nowheredense nullset.
But it it differentiable almost everywhere, not everywhere.
Hence my question is if nondecreasing nonconstant differentiable function can have the above property?
 A: Theorem (Goldowski-Tonelli): If $f$ is a real function on an interval that is differentiable everywhere (where "differentiable" means the derivative exists and is finite) and such that $f'\geq 0$ almost everywhere then, in fact, $f$ is nondecreasing (and by applying the same to $-f$ we get the immediate corollary: if $f$ is differentiable everywhere and $f'=0$ almost everywhere then, in fact, $f$ is constant).
This result is not trivial.  It was proven in 1928 and 1930 by Goldowski and Tonelli independently.  The hypotheses can be weakened slightly: it is enough for $f$ to be (a) continuous everywhere, (b) differentiable on the complement of a denumerable set, and (c) have nonnegative (resp. zero for the corollary) derivative almost everywhere.  Cantor's devil staircaise shows that (b) cannot be weakened to "differentiable almost everywhere".
A (modern) proof of the Goldowski-Tonelli theorem can be found in the paper "On Positive Derivatives and Monotonicity" by Stephen Casey and Richard Holzsager (Missouri J. Math 17 (2005), 161–173), available here.  Many related theorems are stated (and sometimes proved) in Andrew Bruckner's classic book Differentiation of Real Functions (AMS 1994).
The following examples is also worth thinking about: let $r_n$ be an enumeration of the rationals in $[0,1]$.  Let $a_n$ be sequence of positive reals with finite sum.  Then $f(x) := \sum_{n=0}^{+\infty} a_n (x-r_n)^{1/3}$ is a continuous increasing function which is differentiable everywhere except on the rationals where it has $+\infty$ derivative (in the obvious sense).  So the inverse bijection of $f$ is continuous, increasing, differentiable everywhere, and its derivative vanishes on a dense set.  (The derivatives of such functions are called "Pompeiu derivatives".)
A: You seem to mean everywhere differentiable.  The mean value theorem tells us that if $a\ne b$ then for some $c$ between $a$ and $b$ we have
$$
\frac{f(a)-f(b)}{a-b} = f'(c).
$$
If you further insist that $f'$ be $0$ everywhere, then you have $f'(c)=0$, and you can quickly deduce that $f(a)=f(b)$.  Since this applies to ALL possible values of $a$ and $b$, you conclude that $f$ is constant.
All of the above of course depends on the domain of $f$ being a set to which the mean value theorem can be applied, i.e. an interval.
