the output of the password text file contains like this:
username
776655443322 (password encoded)
How to write the value in last line (3rd row) of the file.
after that read and write or alter 3rd row value.
I need logic using "C" language. Please do the needful.
Thanks in advance.
sam
Last edited by mr.sam1024; September 22nd, 2012 at 11:40 AM.
Reason: altered the question in short form
please read the C language manual/reference text available to you for the behaviour of file handles after the execution of the specific file read/write functions that you are using. The text should specifically mention the position of the file pointer before and after the read/write function calls.
Also, there is a file function which I cannot remember about (due to lack of touch for long time) which actually lets you "surf" through a file. It would be good if GCDEF or some other senior member points out the name of that function for you. You may also find that function in your reference manual.
If you do not posses a reference manual, there are a thousand C reference manuals on the internet. Also, you can find a C tutorial I created and distribute freely on the internet at [link] http://www.mediafire.com/?pcfbjh1hwanqzbc[/link]. This tutorial contains all information about C language (well, more or less, it's been made from K & R second edition as the source), and going through it will give you a very comprehensive idea about C programming. But it will be difficult to search of this function here. You can try the last two session, it's in there somewhere.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.