I have to write C program without using any include libraries. For my requirement get command line arguments and write to a file. When I write to file, it will write special characters(Junk). Please provide me solution for this. Can use only read() and write() functions only. 

```
#define O_WRONLY 01
#define O_APPEND 02000

int main(int argc, char *argv[])
{
    int fd;
    fd = open("testfile.txt", O_WRONLY|O_APPEND, 0);
    if(fd < 0 )
        return 1;
    if(argc != 4)
    {
        char bufMsg[] ="Parameters are missing!\n" ;
        write(1, bufMsg, sizeof(bufMsg));
        return 1;
    }
    else
    {
        int i = 0;
        for (i = 1; i < argc; i++) 
        {
            write(fd, argv[i],sizeof(argv[i]));
            write(fd, " ",1 );
        }
        write(1, "\n", 1);
        close(fd);
    }  
    return 1;     
}

```