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 is exit() function?
Can we declare variable anywhere in c?
How would you find a cycle in a linked list?
Diff: between this 2 classes in terms of memory class A { int i; char c; double d; }; class A { double d; int i; char c; }; How it is calculating?
What are pointers? What are stacks and queues?
How can you draw circles in C?
Write a program to swap two numbers without using third variable in c?
In C programming, how do you insert quote characters (‘ and “) into the output screen?
In a switch statement, explain what will happen if a break statement is omitted?
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
User define function contain thier own address or not.
which one is highest Priority in c? a)=,b)+,c)++,d)==