Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!uunet!ogicse!milton!amigo From: amigo@milton.u.washington.edu (The Friend) Newsgroups: comp.lang.c Subject: sequential file writing Keywords: files sequential read/write Message-ID: <12241@milton.u.washington.edu> Date: 3 Dec 90 23:19:34 GMT Organization: University of Washington, Seattle Lines: 20 I need some examples on how to read/write to a sequential file containing 10 names & ages. My init would be to: char *names[10]={............}; int ages[10]={.............}; from there I need info on specific use of file writing. I can use: fprintf(*fp,"%s%c%d", names,DELIM,ages); where *fp is the file pointer, names the name pointer, a deliminator to seperate file information (in this case a '|'), and ages init array. Reading I guess would be as easy as fscanf, but I'm unsure on format. Basically all I need is everything from file writing to reading using *names, and ages. Thanks..email these back please. Brought to you by Super Global Mega Corp .com