Well you posted incorrect code twice now, so how about posting the results from Dave's code?
Or repost your latest effort.
Because isdigit() is for '0' to '9', not 4 or 123 or any other integer value you get.
Well you posted incorrect code twice now, so how about posting the results from Dave's code?
Or repost your latest effort.
Because isdigit() is for '0' to '9', not 4 or 123 or any other integer value you get.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.