Advertisement
apl-mhd

file

Dec 15th, 2016
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3.  
  4. int main(int argc, char **argv)
  5. {
  6.    
  7.    
  8.    
  9.    
  10.     FILE  *writeFile;
  11.    
  12.     int  num;
  13.    
  14.         writeFile = fopen("first.text", "w+");
  15.    
  16.        
  17.        
  18.         fprintf(writeFile, "%d", 2010);
  19.        
  20.         fscanf(writeFile, "%d", &num);
  21.        
  22.         printf("%d\n", num);
  23.    
  24.  
  25.         fclose(writeFile);
  26.    
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement