edited by
483 views

2 Answers

Best answer
2 votes
2 votes
Scanf returns the no of inputs scanned successfully (if format string does not match scan can fail) and printf returns no of characters printed on the screen , so here 1 is returned by scanf (provided we enter a valid integer) and hence 1 is printed on the screen
selected by
3 votes
3 votes
scanf() returns the number of variables initialized with a value , in this case it is 1 because it stores the value of 1 variable .  Therefore scanf() functions returns 1 , which is printed by printf() . Therefore ans is 1 .

Related questions

1 votes
1 votes
2 answers
1
Rajesh Pradhan asked Feb 22, 2016
2,278 views
Prove that in a group of 6 people, there are at least three mutual friends or three mutual strangers.
2 votes
2 votes
1 answer
2
Rajesh Pradhan asked Feb 22, 2016
1,488 views
1. What is equivalence relation? 2. How can u represent equivalence. relation with a data structure? 3. Which data structure? how efficient? How can u test for. equivalen...