#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
	FILE *fpsrc, *fpdst;
	int ch;
	
	fpsrc = fopen("data.txt", "r");
	fpdst = fopen("backup.txt", "w");
	
	while(1){
		ch = fgetc(fpsrc);
		if(feof(fpsrc))
		   break;
		   
		  fputc(ch, fpdst);
	}
	fclose(fpsrc);
	fclose(fpdst);
	printf("The backup.txt created successfully.");
	return 0;
}
