Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A tough C-code!

Status
Not open for further replies.

419

Vendor
May 17, 2000
2
BG
Can someone try and write the C code for the problem below?<br>Define a structure &quot;person&quot; with the following characteristics: name , sex, age.<br>Create a program that:<br><br>&nbsp;&nbsp;-Enters the data for a certain number of structures from the keyboard into a text&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file named &quot;DAT.TXT&quot;.<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;-Reads the data from the text file and writes it&nbsp;&nbsp;into&nbsp;&nbsp;a&nbsp;&nbsp;binary file named&nbsp;&nbsp;&nbsp;&quot;INDATA.dat&quot;.<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;-Reads the data from the binary file and <br>&nbsp;&nbsp;&nbsp;&nbsp;a)distinguishes females and males and puts them in different lists;<br>&nbsp;&nbsp;&nbsp;&nbsp;b)sorts both lists by name;<br>&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;-puts the selected items into two binary files, &quot;OUTDATF.dat&quot; and &quot;OUTDATM.dat&quot;.<br><br>&nbsp;&nbsp;-Prints out the files &quot;OUTDATF.dat&quot; and &quot;OUTDATM.dat&quot;.<br>..<br>struct should be used and not class..<br>thanks a lot.<br>My email: <A HREF="mailto:mickyster@usa.net">mickyster@usa.net</A>
 
It's not really a tough code. This is very easy . But who is going to write it free of charge. Please ask some specific problem. Then it would be worthy. <br><br>Thanx<br> <p>Siddhartha Singh<br><a href=mailto:siddhu_singh@hotmail.com>siddhu_singh@hotmail.com</a><br><a href=siddhu.freehosting.net> </a><br>
 
Well, My C++ instructor( a she) couldn't get it right, and on our next class, maybe she would...<br>I would be very gratefull if you could write this code, it;s for DOS..<br>we use borland 5.0 here..<br>thanks a lot<br>the problem is:<br>Create a program that:<br><br>&nbsp;&nbsp;-Enters the data for a certain number of structures from the keyboard into a text file named &quot;DAT.TXT&quot;.<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;-Reads the data from the text file and writes it&nbsp;&nbsp;into&nbsp;&nbsp;a&nbsp;&nbsp;binary file named&nbsp;&nbsp;&nbsp;&quot;INDATA.dat&quot;.<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;-Reads the data from the binary file and <br>&nbsp;&nbsp;&nbsp;&nbsp;a)distinguishes females and males and puts them in different lists;<br>&nbsp;&nbsp;&nbsp;&nbsp;b)sorts both lists by name;<br>&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;-puts the selected items into two binary files, &quot;OUTDATF.dat&quot; and &quot;OUTDATM.dat&quot;.<br><br>&nbsp;&nbsp;-Prints out the files &quot;OUTDATF.dat&quot; and &quot;OUTDATM.dat&quot;.<br>..<br>struct should be used and not class..<br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top