#include <stdio.h>
#include <stdlib.h>
int main() {
FILE *fp = fopen("myFileFromUrl.txt", "w");
if (fp == NULL) {
perror("fopen() failed");
return EXIT_FAILURE;
}
char buffer[1024];
while (fgets(buffer, sizeof(buffer), fp) != NULL) {
printf("%s", buffer);
}
fclose(fp);
return EXIT_SUCCESS;
}