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???????????
Answers were Sorted based on User's Feedback
Answer / manoj
Mode Type of file Read Write Create Truncate
"r" text yes no no no
"rb" binary yes no no no
"r+" text yes yes no no
"r+b" binary yes yes no no
"rb+" binary yes yes no no
"w" text no yes yes yes
"wb" binary no yes yes yes
"w+" text yes yes yes yes
"w+b" binary yes yes yes yes
"wb+" binary yes yes yes yes
"a" text no yes yes no
"ab" binary no yes yes no
"a+" text yes yes yes no
"a+b" binary no yes yes no
"ab+" binary no yes yes no
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / 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 |
what are # pragma staments?
what are the various memory handling mechanisms in C ?
WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?
6 Answers Finite Infotech, Lovely Professional University, Wipro,
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
two progs are given. one starts counting frm 0 to MAX and the other stars frm MAX to 0. which one executes fast.
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
Difference between constant pointer and pointer to a constant.
I have a function which accepts, and is supposed to initialize,a pointer, but the pointer in the caller remains unchanged.
Why calloc is better than malloc?
explain how do you use macro?
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?