View Single Post
Contributor
27Jan2010,21:52  
Gene Poole's Avatar
You are specifying a width parameter in the %d specifier ("%[width]d" scans a maximum of "width" characters). scanf stops scanning once that many characters are read so the next %d scans from the last position.