C: How to append data to a file without using standard I/O libraries : <p>I was wondering if there is a way to append data to a file without using functions from standard I/O libraries (i.e. <code>stdio.h</code>). I though of doing something like this first:</p>

<pre><code>#include &lt;fcntl.h&gt;
#include &lt;unistd.h&gt;

int main() {
    int fd = open("test.txt", O_WRONLY | O_CREAT, 0700);
    ssize_t wr = write(fd, "hello world", sizeof("hello world");
}
</code></pre>

<p>But this only writes data to the file without appending it so instead repeatedly displaying "hello world", it only overwrites the previous data and displays it once. Can someone please help me out? Thanks</p>
