1. #include <stdio.h>
    2. int main()
    3. {
    4. FILE *fp = NULL;
    5. fp = fopen("/tmp/test.txt", "w+");
    6. fprintf(fp, "This is testing for fprintf...\n");
    7. fputs("This is testing for fputs...\n", fp);
    8. fclose(fp);
    9. }