Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Database Structure

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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
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…
Simple Linear Regression

971 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