printf("Enter the Inputs");
printf("\n a value is :\t");
Enter the Inputs
a value is: 2
what! you amazed with this program?!
In previous post i explained about printf returns a value.
Then i think about that what will be returned by scanf() function.
when i run the program,i got output like this. Go through this program ,definitely
you'll understand the logic.
#include< stdio.h >
printf("Enter the value");
printf("a value is %d",a);
Enter the value
a value is 2
you may get the logic from above programs.
scanf function will return "No of successful inputs getting from user".
In this statement scanf function gets one successful input from the user. so it will return 1.