In C, printf() returns the number of characters successfully written on the output and scanf() returns number of items successfully read.
For example, below program prints geeksforgeeks 13
int main()
{
printf(" %d", printf("%s", "geeksforgeeks"));
getchar();
}
Irrespective of the string user enters, below program prints 1.
int main()
{
char a[50];
printf(" %d", scanf("%s", a));
getchar();
}

