Results 1 to 5 of 5

Thread: File Handling in C

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Answers
    1

    File Handling in C

    Hello friends,

    I want to create an company,in that company ,i have to add employee's record and edit them ,i have to display the project assigned to employees.

    Design
    1.Company Name
    1a.Employees
    -Add record
    -Delete record
    -Search record
    - Project assigned to employee
    Project has
    1. Project ID
    2.Project Name
    3. Staet Date
    4.End Date

    What is the best solution to solve the problem, help me plz.


  2. #2
    Contributing Member
    Join Date
    Nov 2007
    Answers
    46

    Re: File Handling in C

    1. how many fields are there in add record?
    2. how to assign projects to employees?
    3. do you want only project or employees, to display?
    4. how many companies you have to do?
    5. how to assign projects to employees i.e depends on qualification?

    according to your question the system allocates one file for each employee,more memory required to store that details.

    tell me the answers to the above queries and then i solve it.


  3. #3
    Contributing Member
    Join Date
    Dec 2007
    Answers
    46

    Re: File Handling in C

    Quote Originally Posted by thyagi View Post
    Hello friends,

    I want to create an company,in that company ,i have to add employee's record and edit them ,i have to display the project assigned to employees.

    Design
    1.Company Name
    1a.Employees
    -Add record
    -Delete record
    -Search record
    - Project assigned to employee
    Project has
    1. Project ID
    2.Project Name
    3. Staet Date
    4.End Date

    What is the best solution to solve the problem, help me plz.
    Hmm..... this question is too vague to actually give an answer. So, let me ask a few questions so that it will help you clarify your question better.

    1.
    Looks like you are creating some sort of a database of records. So, why not use a commercial database to store and query records??

    2.
    If you do not want to use a commercial database, then what is the platform you are using?? I.e. operating system, language, etc

    3.
    A design for any problem needs to address a few things:
    - how many elements need to be stored??
    - what data structure to use to store the data??
    - what algorithm to use to search the data
    - what is the search speed required??
    - Is parallel access to the data necessary??
    - What is the % of reads v/s writes to the data??

    Without having an idea about the above, the question is really vague.


  4. #4
    Junior Member
    Join Date
    Feb 2008
    Answers
    28

    Re: File Handling in C

    hi

    i think , you are trying to build a C/C++ program to handle a database, right? then

    are you expecting only one company? then

    just create 2 binary file to handle database, one is for employees data and another one is for Project details, you can link them together with having project Id in employees record.
    and you must also have company Id in employee recod.

    you can access records by using fread() and fwrite() in C

    If you want more than 1 company, you must create one more file for company details.

    Jaya



  5. #5
    Junior Member
    Join Date
    Nov 2008
    Answers
    1

    Re: File Handling in C

    i want file handling in C with the same query and same ideas i have put of


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact