home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_08_06 / 8n06072a < prev    next >
Text File  |  1990-04-26  |  490b  |  25 lines

  1. *****Listing 1*****
  2.  
  3.  
  4.      #include <stdio.h>
  5.  
  6.      function()
  7.        {
  8.        FILE *file_printer;     /* Pointer to a file */
  9.        int x, y, z;
  10.        
  11.        x = 5;             
  12.        y = 6;             
  13.        z = x + y;         
  14.  
  15.        /* Open the printer */
  16.        file_printer = fopen("LST","w");    
  17.  
  18.        /* Print the line */
  19.        fprintf(file_printer, "The answer is %10d", z);
  20.  
  21.        /* Close the printer */
  22.        fclose(file_printer);
  23.        }
  24.  
  25.