/* priklad pr8_1.c   formatovany vystup   */
#include <stdio.h>

void main(void)
{
  FILE *fp;
  char stuff[25];
  int index;

  fp = fopen("S.TXT","w");  /* open for writing */
  strcpy(stuff,"To je riadok.");
  for (index = 1;index <= 10;index++)
    fprintf(fp,"%s Cislo riadku %d\n",stuff,index);
  fclose(fp);  /* close the file before ending program */
}