Return value from printf : Printf « Console « C / ANSI-C






Return value from printf

#include <stdio.h>

main() {

     int i = 0;
     
     i=printf("abcde"); 
     
     printf("total characters printed %d\n",i); 
}

           
       








Related examples in the same category

1.Displaying printable charactersDisplaying printable characters
2.Displaying printable characters plus whitspace namesDisplaying printable characters plus whitspace names
3.Demonstrates printing the results of simple equations
4.printf usage
5.Prints 3 characters forward and backward to demonstrate character printingPrints 3 characters forward and backward to demonstrate character printing