Advertisement
CotaIgnorada

archivos

Nov 20th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include<stdio.h>
  2.    int main(){
  3.        FILE *f1;
  4.        f1=fopen("mi_archivo.txt","a");
  5.        if(f1==NULL){
  6.           printf("No se puede abrir el archivo\n");
  7.           return 0;
  8.        }
  9.          else{
  10.             printf("El archivo se abrio\n");
  11.             fprintf(f1,"Hola\n");
  12.             fclose(f1);
  13.     }
  14.         return 0;
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement