home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / datafiles / text / c_tutor / charout.c < prev    next >
C/C++ Source or Header  |  1995-02-27  |  430b  |  17 lines

  1. #include "stdio.h"
  2. main()
  3. {
  4. FILE *point;
  5. char others[35];
  6. int indexer,count;
  7.  
  8.    strcpy(others,"Additional lines.");
  9.    point = fopen("tenlines.txt","a"); /* open for appending */
  10.  
  11.    for (count = 1;count <= 10;count++) {
  12.       for (indexer = 0;others[indexer];indexer++)
  13.          putc(others[indexer],point);  /* output a single character */
  14.       putc('\n',point);                /* output a linefeed */
  15.    }
  16.    fclose(point);
  17. }