?
Solved

Database Structure

Posted on 2006-11-21
2
Medium Priority
?
612 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 250 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

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 …
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

770 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