+By closing the file Descriptor u mean by using system calls right. Yes. +Also can the same thing be done for cin. I did not try but it should work. -Thanks, Syed Khaleelulla. -------------------