can you explain in brief what is "r+" mode in a file... i
know that it si used to read and modify rhe existing
content.... but explalanation about the file pointer in "r+"
mode i wann to know???????????
Answer Posted / abdur rab
When a file is opened with update mode ( '+' as the second
or third character in the mode argument), both input and
output may be performed on the associated stream. However,
writes cannot be followed by reads without an intervening
call to fflush or to a file positioning function (fseek,
fsetpos, or rewind), and reads cannot be followed by writes
without an intervening call to a file positioning function.
Since the file position is altered after read or write.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a c token and types of c tokens?
How many levels deep can include files be nested?
Is null a keyword in c?
Can a pointer be volatile in c?
What is the advantage of using #define to declare a constant?
How can I read in an object file and jump to locations in it?
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
What are the benefits of organizational structure?
What happens if header file is included twice?
What happens if you free a pointer twice?
what type of questions arrive in interview over c programming?
What is #define size in c?
What does s c mean in text?
What is #include called?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1