All pastes #30559 Raw Edit

Untitled

public text v1 · immutable
#30559 ·published 2005-11-23 13:34 UTC
rendered paste body
#include <stdio.h>



const char *duom="tekstas.txt";
const char *rez="gtekstas.txt";
const int max=81;




void main ()
{FILE *in;  //apraso nuoroda i byla
FILE *out;
char ch;
out=fopen (rez, "w");
if ((in=fopen(duom, "r"))!=NULL) //atidaro byla skaitymui ir tikrina ar yra tokia byla
{while (ch=getc(in)!=EOF)
{putc(ch, stdout);

fprintf (out, "%c", ch);}
fclose (in);				//uzdaro byla
fclose (out);
}
else printf ("Failas nerastas\n");
}