Solved

Database Structure

Posted on 2006-11-21
2
604 Views
Last Modified: 2006-11-28
Hey guys.  A friend of mine lent me a C programming book because I was interested and Ive been doin pretty well so far until I stumbled upon a program involving structures.  I basically have to create a database.  Ive read examples but can't seem to grasp it.  Heres the problem:

Write statements that accomplish each of the following.  Assume that the structure:

struct person {
     char lastname [15];
     char firstname [15];
     char age [4];
};
 has been defined and that the file is already open for writing.
                a)Initialize the file "nameage.dat" so that there are 100 records with lastname = "unassigned", firstname = ""            and age = "0".
                b)Input 10 last names, first names, and ages, and write them to the file.
                c)Update the record.  If no record tell the user "no info".
                d)Delete a record that has data by reinitializing that particular record.
0
Comment
Question by:thicken
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Accepted Solution

by:
SStory earned 125 total points
ID: 17995290
Are you sure this isn't a homework assignment?
0
 

Author Comment

by:thicken
ID: 18000285
Nope. Been out of school for a year now. Does it matter if it is?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question