Question
#include<stdio.h>
int main()
{
FILE *fp;
fp=fopen("trial", "r");
fseek(fp, "20", SEEK_SET);
fclose(fp);
return 0;
}
Point out the error in the program?
#include<stdio.h>
int main()
{
FILE *fp;
fp=fopen("trial", "r");
fseek(fp, "20", SEEK_SET);
fclose(fp);
return 0;
}
Answer: Option B
Instead of "20" use 20L since fseek() need a long offset value.
Was this answer helpful ?
Instead of "20" use 20L since fseek() need a long offset value.
Was this answer helpful ?
Submit Solution