Input and output functions in c