LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Closed Thread
  Search this Thread
Old 11-13-2009, 12:18 AM   #1
lomani
LQ Newbie
 
Registered: Nov 2009
Posts: 1

Rep: Reputation: 0
Exclamation 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.
 
Old 11-13-2009, 12:25 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 11-13-2009, 04:46 AM   #3
wje_lq
Member
 
Registered: Sep 2007
Location: Mariposa
Distribution: FreeBSD,Debian wheezy
Posts: 811

Rep: Reputation: 179Reputation: 179
Re: linux system programming problem

Just to immortalize that breathtaking prose, lest it disappear somehow:
Quote:
Originally Posted by lomani View Post
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.
 
Old 11-13-2009, 05:27 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Closed---

lomani;

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


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem on programming expert system psernaalvarez Programming 3 02-15-2008 07:01 AM
Why Linux is best Operating System for Learning/Doing System Programming ? ubaid_t General 6 03-21-2004 02:10 PM
system/linux programming mathfeel Linux - General 2 08-02-2003 02:19 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration