Sail E0 Webinar
Question


What will be the output of the program ?


#include<stdio.h>
int main()
{
FILE *fp;
char ch, str[7];
fp=fopen("try.c", "r"); /* file 'try.c' contains "This is Nagpur" */
fseek(fp, 9L, SEEK_CUR);
fgets(str, 5, fp);
puts(str);
return 0;
}
Options:
A .  agpur
B .  gpur
C .  Nagp
D .  agpu
Answer: Option D



Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers