How to minimize the number of system calls? in C
<p>How to minimize the number of system calls read() and write() in my code ?</p>

<pre><code>int copy(char* entry, char* exit){
    char buf; 
    int in; 
    int out; 

    in = open(entry,O_RDONLY);
    out = open(exit ,O_APPEND|O_WRONLY);
    while(read(in, &amp;buf, 1) != 0){
        write(out, &amp;buf, 1); }

    close(in);
    close(out);
    return 0;

}
</code></pre>