+ 2
[SOLVED] Please help with a code
Whenever I run this code, it shows some unwanted garbage value characters before the output. Can anybody kindly help? https://code.sololearn.com/c3f5BOIz697u/?ref=app Information about the code is given inside the code in the form of comments. Thanks in advance.
2 Answers
+ 8
Add this line after the while loop.
number[c] = '\0';
+ 3
Problem solved. Thanks @Shamima