0
parsing line and getting junk at particular position and for particular amount of data
https://code.sololearn.com/c02T5mkO17J5 Hi friends here I wrote a code for parsing the line like key and value . If I run this code in my gcc compiler I am getting junk data at first value if I give that value 12 characters... If I give 11 or 13 characters I am not getting junk at last of that value. But if I give 12 characters for first value then only getting junk at end of that value. why It's getting junk at last of first value if we give 12 characters.....I am not getting ......could you please explain .. Thank you
7 Respostas
+ 1
Thank you swim
+ 1
Hooo...okay.. you mean we need not to take int return type... if we use only return
0
Actually when I read the data in runtime... then if I not give any data. Then I am getting segmentation fault .....that's why I used return there.