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
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);