Hey guys, first time poster!
I had a quick question for the masses about a program I am writing: I need to take the input from the user at the keyboard that contains all integers, and then store each integer into an array index.
Example:
User inputs: "10 5 6 7 8 111 2 3"
And I would like to have that turned into an array ofWhat is the best way of going about doing this? The number of numbers input by the user is unknown, so I can't do a scanf with a predetermined number of %d's.Code:({ 10, 5, 6, 7, 8, 111, 2, 3 })
Thanks in advance!