#include int main(){ FILE *fp=NULL; FILE *fpout=NULL; char c; fp = fopen("tekst.txt", "r"); fpout = fopen("kopirani_tekst.txt", "w"); if(fp == NULL || fpout==NULL){ printf("-1\n"); return 1; } while((c=fgetc(fp))!=EOF){ putchar(c); //ekv. sa fputc(c, stdout); fputc(c, fpout); } fclose(fp); fclose(fpout); return 0; }