All pastes #918691 Raw Edit

Something

public text v1 · immutable
#918691 ·published 2008-02-26 08:55 UTC
rendered paste body
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
int main()
{
int a,b,c,count=99;
char ch;

a=open("test1.txt",O_RDONLY);
b=open("test2.txt",O_RDONLY);
c=open("final.txt",O_CREAT|O_RDWR);

again:

count=read(a,&ch,1);
if (count==1)
{
write(c,&ch,1);
count=99;
}

count=read(b,&ch,1);
if (count==1)
{
write(c,&ch,1);
count=99;
}
if(count==99)
goto again;
else
printf("ola comple\n");
close(a);
close(b);
close(c);



}