I tried to use both of them opening a file but got the same result. w+ is supposed to create a new file if it doesn't exist while r+ not. Is this the only difference? For example
Solution 1:
Remove file.txt
first and you'll understand the difference.
w+
will create the file.
Post a Comment for "What Is The Exact Difference Between R+ And W+ Modes?"