Input : 100 200 300 and output is 2 40. Why? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Input : 100 200 300 and output is 2 40. Why?

https://code.sololearn.com/c89J1FCAyB7p/?ref=app

3rd Jul 2019, 3:09 PM
Anirban Bal
Anirban Bal - avatar
2 Answers
+ 1
on successfully receiving and assigning inputs obtained scanf returns the number of inputs received so that is assigned to 'a' hence a will be 2. I'am not sure about second output its actually giving 3.
12th Jul 2019, 10:03 AM
N Hrishikesh Prabhu
N Hrishikesh Prabhu - avatar
+ 1
Actually the output 40 is confusing. I have no explanation for this.
12th Jul 2019, 11:06 AM
Anirban Bal
Anirban Bal - avatar