1 Attachment(s)
Read and write the values of file
Hi!
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
Re: Read and write the values of file
I know you haven't been here very long, but you've been here long enough to know this isn't the do my work for me forum.
Re: Read and write the values of file
altered the question in short form...
Re: Read and write the values of file
Dear mr.sam,
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.
Best of luck
Indrajit Paul