reading employee record file and generating the output file alphabetically

This is a discussion on reading employee record file and generating the output file alphabetically within the C Programming forums, part of the General Programming Boards category; I have given an assignment in c and i have no idea about C as such except some basic programming. ...

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    1

    reading employee record file and generating the output file alphabetically

    I have given an assignment in c and i have no idea about C as such except some basic programming. I would appreciate if someone can help me how to do this.

    The given "input.txt" is the file generated by an attendance swipe machine, in a comapny "ABC" in a particular day. In the "input.txt" file, first column is name of the employee ,second column is movement detail, and third coumn is time.Write a C program to parse the input file "input.txt" collected on any working day,and calculate the total working time of each and every employee of "ABC" company on that particular day .Program must be able to display the total working time of each and every employee against their name for any working day.In the result, the name should appear in alpabhetical order.Consider,"input.txt" is a test vector.

    The input.txt file is -


    Ram in 08:26
    Ravi in 08:45
    Sagar in 09:17
    abdul in 09:24
    Ram out 09:25
    Ramya in 09:27
    Ram in 10:03
    Ravi out 12:20
    abdul out 12:24
    sagar out 12:30
    Ravi in 13:03
    Ram out 13:10
    sagar in 13:12
    abdul in 13:15
    Ramya out 13:20
    Ram in 13:25
    Ramya in 13:45
    Ravi out 18:30
    Ram out 19:00
    sagar out 19:15
    abdul out 19:30
    Ramya out 19:45

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Read this first.
    Then read this Homework Policy
    Then post your attempt, and what specifically you are having problems with.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,866
    I have a premonition, the first few lines will contain:
    Code:
    void main(){
    .....
    }
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

  4. #4
    msh
    msh is offline
    Novice
    Join Date
    Jul 2009
    Posts
    568
    Quote Originally Posted by AndrewHunter View Post
    I have a premonition, the first few lines will contain:
    Code:
    void main(){
    .....
    }
    nostradamus.jpeg
    Disclaimer: This post shows my ignorance at the time of its making. I claim ownership of but not responsibility for all errors in it. Reference at your own peril.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Update Record & Delete Record in File.
    By unsafe_pilot1 in forum C Programming
    Replies: 13
    Last Post: 05-18-2008, 07:22 AM
  2. Reading flat file and generating tagged file
    By AngKar in forum C# Programming
    Replies: 4
    Last Post: 03-24-2006, 07:29 AM
  3. Replies: 20
    Last Post: 06-12-2005, 11:53 PM
  4. Reading a record from a File
    By David101 in forum C Programming
    Replies: 2
    Last Post: 12-14-2004, 05:42 PM
  5. reading a customer record file
    By abbycat131 in forum C++ Programming
    Replies: 1
    Last Post: 01-29-2003, 08:15 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21