Computer Science, asked by deepsahil1295, 9 months ago

Write a program to read a set of integers from a file, sort them and output them into another file.​

Answers

Answered by HeartKillerTigress
3

Answer:

  • open a file: FILE* inFile = fopen("input.txt", "r").
  • read a single value from the input. int numConverted = fscanf(inFile, "%d", &value).
  • allocate some memory: int *pInts = malloc(n * sizeof(int)).
  • sort the array.
  • fprintf(outFile, "%d\n", i).
  • write a single value out as binary.
Answered by BRAINLYARMY001
5

hy

your answer is here !

open a file: FILE* inFile = fopen("input.txt", "r").

read a single value from the input. int

numConverted = fscanf(inFile, "%d", &value).

allocate some memory: int *pInts = malloc(n * sizeof(int)).

sort the array.

fprintf(outFile, "%d\n", i).

write a single value out as binary.

.

follow \:  \:  \: me

Similar questions