You'd best get a book on C and read it, because it sounds like you really want a tutorial rather than the kind of specific help one finds on forums such as this one. By the way, printf uses stdout and scanf uses stdin.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.