K&R2 - Piece of code not working.
Hello everyone, this is my first post here so I salute you all!
I am learning C after "The C programming language-second edition" by Dennis Ritchie. There is a piece of cod that doesn't do what it should: counting characters.
I am using windows7 , devc++ and I am running exe files in cmd. When I run the code above, I can input characters but after hitting Enter I don't get any number( to show how many characters I typed ). I do not have any previous experience with programming languages so please explain at a noob level! :)
nc = 0;
while (getchar() != EOF)