Andrerb

Remove repeated strings

Sep 3rd, 2020
2,466
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include <stdbool.h>
  6. #define SIZE_ALPHABET 26
  7. typedef struct FileOrdena {
  8.     int frequency Word;
  9.     char wordArchive [SIZE_ALPHABET];
  10. } FileOrdena;
  11. int main(){
  12.     FILE * file1;
  13.     File Order document;
  14.     int contFreq = 0;
  15.     if ((file1 = fopen ("entry.txt", "r")) == NULL) {
  16.         printf ("Format: executable file \ n");
  17.         return 0;
  18.     }
  19.     while (fscanf (file1, "% s% d", document.wordfile, & document.frequencyword)! = EOF) {
  20.         printf ("% s% d \ n", document.wordfileArchive, document.frequencyword);
  21.         contFreq = contFreq + 1;
  22.     }
  23.  fclose(file1);
  24.  return (EXIT_SUCCESS);
  25. }
RAW Paste Data