The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
q on fseek() & ftell() + tga files JamesGoh High Level Programming 2 07-31-2008 04:20 PM
error when using fseek() function ivancheung High Level Programming 3 10-01-2004 04:32 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-15-2009
ramkrix ramkrix is offline
Registered User
  
 

Join Date: Dec 2007
Location: TamilNadu,INDIA
Posts: 52
Red face help with fseek

Hi,

I working a c project in IBM AIX. I have a requirement like this.

I have some contents in *temp. I am writing the contents of *temp to a file pointer ftemp (*ftemp for an tmp file tmpfile.txt)

Now I want to read the contents of *ftemp in the reverse order an dneed to print it in the screen.

say if *temp="979899", in ftemp also it will be 979899. From ftemp I need to read the file from the reverse direction. For that I used fseek as below

fseek(ftemp,0,SEEK_END) - this will place the pointer at the end. Now how to read it till the beginning, which function to use.. The contents from ftemp should be read in reverse directiona nd need to be printed in stdout.

Please help me, this is a kind of urgent requirement.

Thx in advance.
 

Bookmarks

Tags
c prgm, eof, file pointer, fseek, libraryfunctions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:24 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0