Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telix/SALT v3.15 & RS-232, Hayes - <b>fputc</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  FPUTC

  .  Summary

  fputc(int <c>, int <fh>);

  .  Description

  The fputc function writes a character to the file indicated by the
  file handle <fh>. <c> is the character to write.

  .  Return Value

  The character written is returned, unless there is an error, in
  which case a value of -1 is returned.

  .  Example

  int f, i;
  str teststr[] = "This is a test string";
  f = fopen("test.dat", "w");
  for (i = 0; i < 21; ++i)           // write out string to file
   fputc(subchr(teststr, i), f);     // character by character

See Also: fgetc fputs fwrite ASCII table fgets fread

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson