Hello, I am a newb to C, been programming Basic/Visual Basic since 1984. Trying to teach myself, (as I learned Basic, HTML, etc) using books. I have searched here and google, but did not find the answer to this, so I hope someone can explain the issue to me. The code below works fine with the scanf line commented out, and prints a nice list of the test integers and the count. When I uncomment the scanf line, it prints one line, then stops for input as expected, but does not do the printf line in any subsequent iteration, just stopping for the scanf input, but not printing the count line. Why does it behave like this?
Thank you, you were correct, the problem was due to my using a variable instead of a pointer. I did not want 2 values, but that was an idea I found (as well as the leading space before the %c) somewhere else that seemed to solve an issue, but in actuality was suppressing the error message. Pointers are a new concept to me.
Here is the corrected code for the benefit of other rank noobs like me!