Solved

Database Structure

Posted on 2006-11-21
2
597 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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …

829 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