473,387 Members | 1,897 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Handling large records in C

Pls tell how to handle large records in C using files .The records contain name, code, address etc,......
Sep 25 '06 #1
8 4103
Banfa
9,065 Expert Mod 8TB
The question is not really clear, create a structure for each record.
Sep 25 '06 #2
pls provide some related code
Sep 25 '06 #3
Banfa
9,065 Expert Mod 8TB
pls provide some related code
Expand|Select|Wrap|Line Numbers
  1. struct record {
  2.     char name[MAXNAME];
  3.     unsigned code;
  4.     char address[MAXADDRESS];
  5. };
  6.  
Sep 25 '06 #4
pls tell how to write info in file. Thanks
Sep 25 '06 #5
Banfa
9,065 Expert Mod 8TB
pls tell how to write info in file. Thanks
look up the functions

fopen
fclose
fread
fwrite
Sep 25 '06 #6
Thanks
But problem is that the fread and fwrite are fro binary files.
I want to write the infromation in the following format in text files:
Record-1 Name Age .......
Record-2..

Pls check
Sep 26 '06 #7
pls check how to write in text file and read the same form text file and with proper formatting,
Sep 27 '06 #8
Banfa
9,065 Expert Mod 8TB
Thanks
But problem is that the fread and fwrite are fro binary files.
I want to write the infromation in the following format in text files:
Record-1 Name Age .......
Record-2..

Pls check
In that case look up

fputs
fprintf

Just because fread and fwrite are for binary data doesn't stop you using them to write text. text is binary data too as far as the computer is concerned it is just you that chooses to view it differently.
Sep 27 '06 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

24
by: Salad | last post by:
Every now and then I see ads that state something like "Experience with Large Databases ...multi-gig...blah-de-blah" And I have to laugh. What's the difference between a large or small database? ...
14
by: Al Smith | last post by:
I need help in implementing proper error handling. I am trying to upload a file based on the sample code below. The code works well except if the file selected is too big. I do know about the...
7
by: athos | last post by:
Hi guys, Got a problem now :( please help... now we got a project handling records saved in a table in a sql 2000(will upgraded to 2005 soon) server. every month around a million records will...
7
by: DanZaMan | last post by:
Just a query about how clever access is, I'm using access 97. When using a "split" database with a separate front-end and with the data file on a separate server on the network how does access...
7
by: =?Utf-8?B?TW9iaWxlTWFu?= | last post by:
Hello everyone: I am looking for everyone's thoughts on moving large amounts (actually, not very large, but large enough that I'm throwing exceptions using the default configurations). We're...
2
by: =?Utf-8?B?UHJpeWE=?= | last post by:
Hi, I'm faced with a classic problem of how to update a large number of records from a web page. I;m trying to build an interface that will display recordset in the order of 3000 rows and allow...
9
by: pargat.singh | last post by:
Hi Everyone: I have a C# program which loop through No. of files. In UAT i had medium size files and every thing goes ok but in Production files are big and i notice that my program is very...
25
by: tekctrl | last post by:
Anyone: I have a simple MSAccess DB which was created from an old ASCII flatfile. It works fine except for something that just started happening. I'll enter info in a record, save the record,...
2
by: nguyenminhhai | last post by:
Hi everyone, I'm reading "The C++ Programming Language" (Bjarne Stroustrup, 3rd edition). At page 193, he said "Doing error handling using the same level of abstraction as the code that caused the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.