Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #107.70K
1 Posted Topic
The problem originates from the function "fgets"http://en.cppreference.com/w/c/io/fgets , when the input is: "3 0 3 123123", fgets will read the space in front of the "123123", so the variable str actually is " 123123", which has strlen of 7!!!
The End.