Sail E0 Webinar
Question


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;
}
Options:
A .  Error: unrecognised Keyword SEEK_SET
B .  Error: fseek() long offset value
C .  No error
D .  None of above
Answer: Option B

Instead of "20" use 20L since fseek() need a long offset value.

Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers