C++

Objectives :

  • myFile_perror1.cpp
    FILE * file1;
    file1=fopen("blab.txt", "r");
    if(file1==NULL)
    {
    perror("Error: x@#4%\n");
    clearerr(file1);
    cout<<" Bye Now";
 

Step: 1 Create a source file.

Step: 2 Edit and save Source file

Step: 3 Runtime Views:

Step: