hi can anyone tell me how to write the output of this code to a file??
#include<stdio.h>
#define MAX 10
char array[MAX];
void main()
{
void addvalues();
addvalues();
}
//funtiocn that will allowe the user to add the values
void addvalues()
{
printf("------------------------> Insearting List Elements <---------------------------\n");
int i;
printf("Enter you the 10 elements\n");
for(i=0; i<MAX; i++)
{
printf("Enter element number %d:\t ", i);
scanf("%s", &array[i]);
printf("\n");
}
}