#include #define MAX 100 int main(){ FILE *fp=NULL; FILE *fpout=NULL; char line[MAX]; fp = fopen("tekst.txt", "r"); fpout = fopen("kopirani_tekst.txt", "w"); if(fp == NULL || fpout==NULL){ printf("-1\n"); return 1; } while(1){ fgets(line,MAX,fp); if(feof(fp)) break; fputs(line,fpout); } fclose(fp); fclose(fpout); return 0; }