03-09-2006
11,728,
1,345
Join Date: Feb 2004
Last Activity: 8 May 2020, 9:07 AM EDT
Location: NM
Posts: 11,728
Thanks Given: 903
Thanked 1,345 Times in 1,201 Posts
The standard for atoi is to read along a string from a given starting point until it encounters a space, a nul, or a non-numeric character. "name" starts with an "n" which is non-numeric. atoi is finsihed before it starts. By definition, atoi returns 0 in that case.