#include <stdio.h>
int main() {
// File copy
FILE *sourceFile, *destinationFile;
char buffer[100];
sourceFile = fopen("source.txt", "r");
destinationFile = fopen("destination.txt", "w");
if (sourceFile != NULL && destinationFile != NULL) {
while (fgets(buffer, sizeof(buffer), sourceFile) != NULL) {
fputs(buffer, destinationFile);
}
fclose(sourceFile);
fclose(destinationFile);
printf("File copied successfully.\n");
} else {
printf("Unable to open files.\n");
}
return 0;
}