hi all,
thanks for reading my post. sorry about the tittle (so whatever ;))
i have this situation. i have an array like this:
lemon
banana
pineapple
and i have fruit.txt which has this inside:
corn
melon
berry
blackcurrent
apple
what i want to do is, i want to copy the list in array to the fruit.txt but,the list must be top of the list in file like this:
lemon
banana
pineapple
corn
melon
berry
blackcurrent
apple
anyone has an idea about the code?since this is not work for this situation
char seed_array[100][100]="lemon","banana","pineapple";
int row=5;
for(int count=0;count<=row;count++)
{
fprintf (fruit_file,"\n%s",seed_array[count]);
}