f(n){return n?1+f(n/10):0;} main(void){ printf("%d",f(-12345678)); }
Standard input is empty
8
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!