i need one program from c in the file concept

October 7, 2010 at 11:40:39
Specs: Windows 7
1.first two different files created in the name of FILE A and FILE B in various locations using array
concept.
2.format of first file FILE A

AAABBBBBAAAAABBB
CCCDDDDDCCCCCDDD
EEEFFFFFFEEEEEFFF

3.format of second file FILE B

1111111111111111111
2222222222222222222
3333333333333333333

4.these two files stored in FILE C, the format of output

AAAAAAAABBBBBBBBCCCCCCCCDDDDDDDDEEEEEEEEFFFFFFFF
1111111111111111111222222222222222222223333333333333333333333


See More: i need one program from c in the file concept

Report •


#1
October 7, 2010 at 15:22:12
Not sure what you want to do; code would be helpful. :P

It would seem that you'd want a file handle (at least one), and perhaps a char array containing your strings. A generalization *might* be something like

...
FILE *fp = fopen("some path to file", "w+"); // open for read and write.
char *buffer[BUFSIZ] = { "string 1", "string 2", "string 3", "string n" }; 
int i;

for(i=0; i < total number of strings to write; i++) {
   fprintf(fp, "%s", buffer[i]);
}
...
fclose(fp);

HTH

-------------------------------------------
I have no aspiration for preaching. ;-)


Report •

#2
October 7, 2010 at 15:38:50
shutat, you're gaining a history of doing people's homework for them. Stop that. It's rude.

How To Ask Questions The Smart Way


Report •

#3
October 10, 2010 at 11:40:20
what did u mean to understand my question? why did u reply to this type of answer?

Report •

Related Solutions


Ask Question