main()
{
FILE *fs;
char c[10];
fs = fopen(“source.txt”, ”r”); /* source.txt exists and
contains “Vector Institute” */
fseek(fs,0,SEEK_END);
fseek(fs,-3L,SEEK_CUR);
fgets(c,5,fs);
puts(c);
}
Answer Posted / sahoo845
it prints ute.
SEEK_END moves the pointer to end of the file.
SEEK_CUR moves the pointer 3 places back(-3L). Nw the pointer is at u.
gets() tries to fetch 5 characters from the present position of pointer but can fetch only 3 characters as it reaches end of file.
puts() prints the characters i.e. ute.
Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
What is the use of sizeof?
Why is c fast?
What are the advantages of using linked list for tree construction?
What is the significance of scope resolution operator?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
What is const volatile variable in c?
What are c header files?
How can I read a binary data file properly?
Explain what is the heap?
What is the hardest programming language?
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?