Check how many char have been outputed from printf : Console Output « Console « C / ANSI-C






Check how many char have been outputed from printf

Check how many char have been outputed from printf
  
#include <stdio.h>

int main(void)
{
  int i;

  printf("%d %f\n%n", 100, 123.23, &i);
  printf("%d characters output so far", i);

  return 0;
}

           
       








Related examples in the same category

1. Flush a stream: how to use fflush