Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int main(){
- FILE *saida;//ponteiro para o arquivo log.txt
- saida = fopen("log.txt","w");
- char nome[30];
- char sobrenome[30];
- scanf("%s", nome);
- scanf("%s", sobrenome);
- fprintf(saida,"Nome: %s Sobrenome: %s\n\n", nome,sobrenome);
- close(saida);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement