Write a program to open a file using fopen()
#include<stdio.h>
void main()
{
fopen()
file *fp;
fp=fopen(“student.DAT”, “r”);
if(fp==NULL)
{
printf(“The file could not be open”);
exit(0);
}
#include<stdio.h>
void main()
{
fopen()
file *fp;
fp=fopen(“student.DAT”, “r”);
if(fp==NULL)
{
printf(“The file could not be open”);
exit(0);
}