That the char variable c contains a newline character. If you use cout<<c; it will go to the next line.
You can also make the code you post easier to read by clicking the <> button on the side of the post window, and putting your code inside the auto generated tags. While not a big deal in this case, when you go to post more complex code in the future, it will make life easier for everyone.
This code gets one character (written to c) at a time. For each character in the stream, noc is incremented. Whenever the new character is a new line, nol is incremented.
Running this code might not work so well. cin.get() returns the state of cin. Which, if a new line is entered, becomes empty pretty quick. Not sure if you'd be able to get more than 1 nol before the code exits. If it was an istringstream object or ifstream object, I think it'd be a bit nicer.