Saturday, March 12, 2011

what scanf returns?????

scanf() returns the number of variables that were successfully assigned values means the number of successful inputs.

lets try to understand more clearly with the help of an example:

void main()
int i,j,k;
printf("Enter the values:");
printf("value of i=%d",i);

Enter the values:12 13
value of i=2