Created
April 8, 2018 13:26
-
-
Save valerionew/9db7d4c27f06e6da95c2f201902f24d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
int main(int argc, char const *argv[]) { | |
FILE * lettura = fopen("campionetesto.txt", "r"); | |
if ( lettura == NULL ) | |
return -1; | |
FILE * scrittura = fopen("campione.txt", "wb"); | |
if ( scrittura == NULL ) | |
return -1; | |
uint16_t number = 0; | |
do{ | |
fscanf(lettura,"%d", &number); | |
fwrite(&number, 1, 2, scrittura); | |
}while (!feof(lettura)); | |
fclose(lettura); | |
fclose(scrittura); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment