Hi,
for b and c it will work as you expect with the current code.
The problem for a is that the way you use it is not differentiable. it does not make sense to ask how would the output change if I change a very sligtly. You see that it will do no change (gradient of 0) almost everywhere. And at the point where it crosses the threshold value, then the gradient would be infinite as the  change in the output is not contiguous. So for a, the only gradient you can get is 0 everywhere. Which you can’t use to learn anything.