LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   linux system programming problem (https://www.linuxquestions.org/questions/programming-9/linux-system-programming-problem-768829/)

lomani 11-13-2009 12:18 AM

linux system programming problem
 
Write a program that performs the following:
It opens the file called “input.dat”, that has already been created and continuously reads a student record from the file, writes the data in a file called “newinput.dat”, obtains the time in seconds and microseconds generated by the gettimeofday() function,

writes it also in the file and continues the whole process until reaches the end of the file “input.dat”.
Thus the data in file “newinput.dat” will consist of a sequence of data with the following pattern: <Student Record > <Time Record> <Student Record><Time Record>….etc.

acid_kewpie 11-13-2009 12:25 AM

Per the LQ Rules, please do not post homework assignments verbatim, and wow, that really IS verbatim isn't it? No time to even say please or thankyou. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and Google searches) and we'll do our best to help. Also, keep in mind that your instructor might also be an LQ member.

wje_lq 11-13-2009 04:46 AM

Re: linux system programming problem
 
Just to immortalize that breathtaking prose, lest it disappear somehow:
Quote:

Originally Posted by lomani (Post 3755151)
Write a program that performs the following:
It opens the file called “input.dat”, that has already been created and continuously reads a student record from the file, writes the data in a file called “newinput.dat”, obtains the time in seconds and microseconds generated by the gettimeofday() function,

writes it also in the file and continues the whole process until reaches the end of the file “input.dat”.
Thus the data in file “newinput.dat” will consist of a sequence of data with the following pattern: <Student Record > <Time Record> <Student Record><Time Record>….etc.


pixellany 11-13-2009 05:27 AM

Closed---

lomani;

Please feel free to re-post according to the guidelines stated by acid_kewpie


All times are GMT -5. The time now is 04:23 AM.