0

Hi,
I want to display a particular row of a text file and delete a particular row using C by having account no. as reference..
Can anyone help me in this.

Sample.Txt:

1234567890 James 24 50000
1234567891 Allen 32 46500
1234567892 Robert 41 13600
1234567893 Smith 29 49000

Thanks in advance..

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Karthika_g
0

Get row: you will have to sequentially read each line of the file in order to get to the row you want.

Delete row: rewrite the entire file, omitting the row to be deleted. Open two files: input file is the file that contains the row to be deleted, the second is an output file that will contain the new rows.

0

Get row: you will have to sequentially read each line of the file in order to get to the row you want.

Delete row: rewrite the entire file, omitting the row to be deleted. Open two files: input file is the file that contains the row to be deleted, the second is an output file that will contain the new rows.

Thank You I have gone through... :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.