I guess, if file is not found, fopen will return -1. Which will evaluate the statement if(f=fopen("file.txt","r")) as true..
-- *Regards Jitesh Kumar "There is only one 'YOU' in this world. You are Unique and Special.* *Don't Ever Forget it."* -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.