Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #ifdef WIN32
- #include <conio.h>
- #define LIMPA_TELA system("cls")
- #else
- #include <ncurses.h>
- #define LIMPA_TELA system("clear")
- #endif
- int main()
- {
- int i;
- char frase[]="Sistema Operacional GNU/Linux";
- FILE *fp = fopen("saida.txt","wt");
- for(i=0; frase[i]!='\0';i++)
- fprintf(fp,"%c",frase[i]);
- fclose(fp);
- printf("arquivo gravado\n");
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement