That's the point of the program, to tell you whether the file was opened successfully.
i want to display file in notepad..
Please note that we're not going to write your program for you. You asked a specific question and got a specific answer. Now it's up to you to ask more specific questions or apply what you've learned in this thread to your actual program.