473,406 Members | 2,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Reading and Writing Files

Hi,I have a Question about reading and writing a file

im little bit curious about this.

for example I write and save it to a notepad "Helo world"
then I want it to do in reverse order then in turn in to dlrow oleH

and it will produce another notepad.
Feb 15 '12 #1
1 1677
weaknessforcats
9,208 Expert Mod 8TB
Files always read in a forward direction. To reverse a file you would read the entire file into a buffer and process the buffer from the end to the beginning.

If the file is oo large for meory, you can read records from the beginning to the end placing each record in a linked list. You then reverse the file by processing the list backwards and the data in each node backwards.

Bon appetit!
Feb 15 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: yawnmoth | last post by:
i'm trying to read / write a file, and am having some problems... here's the php script i'm trying to read / write with: <? $fp = fopen("test","r+"); while (!feof($fp)) { $temp=fgets($fp);...
1
by: Reimar Bauer | last post by:
Hi I have a text file which I could access by smb with the following lines. Number= 203214 This looks similiar to the php.ini where are a reading routine could read chapter and values
5
by: A. Gaubatz | last post by:
In VB6, I would open files with: Open <file name> For <input/output/append> As <file number> I could then use the Write/Input commands to modify/read the file. How do I do this in VB.NET? ...
1
by: Bit Twiddler | last post by:
Does the BCL have built-in support for reading/writing standard ini files? Thanks! BT
8
by: smeenehan | last post by:
This is a bit of a peculiar problem. First off, this relates to Python Challenge #12, so if you are attempting those and have yet to finish #12, as there are potential spoilers here. I have five...
5
by: UJ | last post by:
I have a system that has five programs that all communicate with each other via Message Queues. Works well. One program is a watchdog that will make sure the others are up and going. Currently I...
1
by: ChrisFrohlich | last post by:
ASP.NET 2.0 with Text DataTypes: I've got a similar question going in the SQL group, but I was wondering if anyone has successfully implemented reading/writing character data from a Text datatype...
5
by: RyanL | last post by:
I'm a newbie with a large number of data files in multiple directories. I want to uncompress, read, and copy the contents of each file into one master data file. The code below seems to be doing...
2
by: sandipm | last post by:
Hi, I am trying to read a file and write into other file. if I do it for simple text file, it works well. but for pdfs or some other mime types, its failing. actually main problem is i am...
2
by: Dr1ver | last post by:
Hi I have recently been looking into writing and reading txt files on vb6 but im a bit stuck on how to check against what is in the txt file for example if the text document has "1","2" in i want...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.