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