diff --git a/fact.c b/fact.c index ec6d12fce69b4271b251a97b35a96d8f7fd0af0f..5516bd4bdd2aa7168e9658483279b65e88991d97 100644 --- a/fact.c +++ b/fact.c @@ -1,5 +1,5 @@ // -// Modified on 09/05/2020. +// Modified on 25/04/2020. // #include <errno.h> #include <sys/types.h> @@ -162,7 +162,7 @@ void *read_write() { } #define DEFAULT_NO_THREADS 2 -#define MAX_NO_THREADS 20 +#define MAX_NO_THREADS 40 // MAIN PROGRAMME int main (int argc, char *argv[]) { @@ -219,7 +219,7 @@ int main (int argc, char *argv[]) { */ // Open input and output files f.in = fopen(inputfile, "r"); - f.out = fopen(outputfile, "a+"); + f.out = fopen(outputfile, "w"); if ((f.in == NULL) || (f.out == NULL)) { printf("Incorrect input_file or output_file name\n"); exit(EXIT_FAILURE); @@ -255,3 +255,4 @@ int main (int argc, char *argv[]) { fclose(f.out); return (EXIT_SUCCESS); } +