+ 1

Why do I get strange characters that are not in file?

When I run this on my pc, I get "I am a file scsc"(without quotes) where sc is a strange character. (Such as @,#, etc. (Some sc are not even on keyboard). When I use frm_file[20] , it prints "I am a file" (correct output). Also, when I use frm_file[100] or 1000 or very larger values, I get correct output. Why?? https://code.sololearn.com/cH9aceCVpk0r/?ref=app

30th Nov 2019, 9:31 AM
A_Coder
A_Coder - avatar
4 Answers
+ 1
Ok ~ swim ~ . I'll try this. Thanks
30th Nov 2019, 10:42 AM
A_Coder
A_Coder - avatar
0
Maybe Because in your file you have data more than 15 characters and you defined file size with 15 character.
30th Nov 2019, 9:35 AM
A͢J
A͢J - avatar
30th Nov 2019, 9:41 AM
A_Coder
A_Coder - avatar