0

What is the problem in the below code?

Read the comment in the code also can someone explain me the error. Thank you:) https://code.sololearn.com/cYSpZs6M3m7i/?ref=app

15th Apr 2020, 6:03 PM
Akash
Akash - avatar
1 Answer
0
scanf takes input only till it finds space so anything after that is not considered. It can be replaced by fgets() which is safe to use when compared to gets(). fgets(string,20,stdin);
15th Apr 2020, 6:16 PM
Avinesh
Avinesh - avatar