explain output and input of reader and writer objects respectively