Advertisement
apl-mhd

WordSEarch

Dec 19th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1.  
  2. #include<string.h>
  3. #include <stdio.h>
  4.  
  5. int main(int argc, char **argv)
  6. {
  7.    
  8.     FILE *fileWrite, *open;
  9.     char ch, dh;
  10.     int n, i;
  11.     char name[100];
  12.    
  13.    
  14.     fileWrite = fopen("orko.txt", "w");
  15.    
  16.     fprintf(fileWrite, "%d %d", 10,20);
  17.    
  18.     fclose(fileWrite);
  19.    
  20.     open = fopen("orko.txt", "r");
  21.    
  22.     while((fgets(name,100, open)) != NULL){
  23.        
  24.                
  25.    
  26.     printf("%s\n",name);
  27.    
  28.         }
  29.    
  30.     fclose(open);
  31.    
  32.    
  33.    
  34.    
  35.    
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement