Advertisement
Guest User

Abre Arquivo

a guest
Oct 19th, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int main()
  4. {
  5.     FILE* p_arquivo = NULL;
  6.     //abre o arquivo
  7.     p_arquivo = fopen("MD5SUMS", "r");
  8.  
  9.     if (p_arquivo == NULL)
  10.     {
  11.         printf("Erro na abertura do arquivo\n");
  12.         exit(1); //sai se tiver error
  13.     }
  14.  
  15.     //fecha o arquivo
  16.     fclose(p_arquivo);
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement