Playing with nested functions in C