[c] How to extract numbers from string in c?