473,394 Members | 1,663 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,394 software developers and data experts.

Help with filing

I need a help for my project that is
"Design database of school information system"
Database of 10-20 schools having read and write capabilities using filing for future access to the given information using searching .


i didn't understand that what is filing?

i done a program in structure but don't know how to do in file please solve my problem ..i have to submit this with in a week...


#include<stdio.h>
#include<conio.h>
#include<graphics.h>
struct school
{
char name[100];
char pname[50];
int address;
int pnumb;
char schof[10];
char schtype[50];
char city[50];
};

struct school sch[100];
void main(void)
{
clrscr();
int i,index=0;
int left=18,top=7,right=60,bot=20;
int numcolors=18;
int j;
char repeat='Y';

do
{
printf("\nEntry No.%d\n",index);
printf("Enter school name:");
scanf("%s",sch[index].name);
printf("Enter principle name:");
scanf("%s",sch[index].pname);
printf("Enter street address:");
scanf("%d",sch[index].address);
printf("Enter phone number:");
scanf("%d",sch[index].pnumb);
printf("Enter city name in which it situated:");
scanf("%s",sch[index].city);
printf("Enter school education type:");
scanf("%s",sch[index].schof);
printf("Enter either school is primary or secondary:");
scanf("%s",sch[index].schtype);
index++;

if(index<20)
{
printf("DO YOU HAVE ANOTHER ENTRY? Y or N:");
repeat=getche();
putchar('\n');
}
}
while(index<20&&(repeat=='Y'||repeat=='y'));
clrscr();
gotoxy(18,5);
printf("---------------------------------------------");
window(left,top,right,bot);
for(j=0;j<20;j++);
{
textcolor(j%numcolors);
cputs("** DATABASE OF SCHOOL INFORMATION SYSTEM **");
}
gotoxy(0,3);
printf("--------------------------------------------");

for(i=0;i<index;i++)
{
printf("\n\t\tEntry No.%d\n",index);
printf("\n\n\t\t\tNAME OF SCHOOL:%s",sch[i].name);
printf("\n\n\t\t\tNAME OF PRINCIPLE:%s",sch[i].pname);
printf("\n\n\t\t\tADDRESS:%d",sch[i].address);
printf("\n\n\t\t\tPHONE NUMBER:%d",sch[i].pnumb);
printf("\n\n\t\t\tCITY:%s",sch[i].city);
printf("\n\n\t\t\tEDUCATION TYPE:%s",sch[i].schof);
printf("\n\n\t\t\tPRIMARY OR SECONDARY:%s\n",sch[i].schtype);
}

getch();
}
data base school information system in file
Nov 8 '06 #1
1 4392
Banfa
9,065 Expert Mod 8TB
By filing it means write the data input to file and then may be at a later date read the file of data back into the program.

Look up the following functions for reading and writing files

fopen
fclose

fgets
fputs
fprintf

fread
fwrite
Nov 9 '06 #2

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

Similar topics

0
by: abcd | last post by:
kutthaense Secretary Djetvedehald H. Rumsfeld legai predicted eventual vicmadhlary in Iraq mariyu Afghmadhlaistmadhla, kaani jetvedehly after "a ljetvedehg, hard slog," mariyu vede legai pressed...
2
by: j. shepherd | last post by:
I am looking for a filing software for the office. I need to get all of the files in the office entered into some type of software or database, that I can pull up scanned documents, location of...
1
by: kufre | last post by:
I need some help. I have a option group button that contain two checkbox call Active and Inactive on my Filing form. This is what I want, the Active box will alway be the default checkbox,the...
7
by: Brian Henry | last post by:
I have a list box bound to a data set, of course the datasource,datamember, and valuemember are set, i tell it selecteditem = -1 to make nothing selected, select mode is set to only one item at a...
2
by: brynk | last post by:
Anyone please help... I'm a newbie on creating functions in postgresql. Here is an oracle package that I'm trying to port to postgresql: CREATE OR REPLACE PACKAGE BODY NewsPkg.NewsTools AS...
11
by: Maria Mela | last post by:
Hello everyone... Anybody can help me on this project?? Thks for your time... Requirements Information: of the Card Each card will have a set of information associated. These information...
1
by: editprod | last post by:
I'd like to create an Access database for my the central filing system of my office. My boss can never find where files are. We have approx. 2000 files in a dozen file drawers, each drawer with a...
1
by: RANIA | last post by:
i wana make a program in which user find the index of agiven string through filing and also user can delete the given string from file replace and isert a string into fil.
2
by: Dio1080 | last post by:
Hello, I need help making a table based off my tax code I made, the tax code was a little, but I need help with the table part also. The table should look like this: Income | Single Married |...
0
by: Chicago | last post by:
$9.95 Online Tax Filing www.MHBSgloabl.com
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.