fopen opens a file resource, in order to read, write or append content to it.
I used 'fopen' in a C program to open a file in readonly mode (r). But in my case I …