Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include "Ztring/Ztring.h"
  4.  
  5. int main()
  6. {
  7.     unsigned char * words = file_get_contents ("words10.txt");
  8.     FILE *output = file_open ("words10-digits.txt", "w+");
  9.     int len = strlen(words);
  10.     int pos = 0;
  11.     char word [13] = {0};
  12.  
  13.     while (pos < len)
  14.     {
  15.         pos = str_getline (words, word, sizeof(word), pos);
  16.         for (int id = 0; id < 100; id++) {
  17.             fprintf (output, "%s%02d\n", word, id);
  18.         }
  19.     }
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement