I am working on a project where the user enters in an unspecified amount of integers. I havent came up with a good solution.
I can have the user enter the integers using scanf. Scanf returns the amount of items entered I can use this to determine how much memory to allocate with malloc. The problem is does scanf only count the valid data
(integers as opposed to characters?). How would I handle if a character was in the mix of integers?
Am I headed in the right direction on this or does anyoen have a much better way of handling this.