A comment may need to go either above or below a piece of code, depending on what kind of comment it is: if it gives an ultra-brief explanation of what the code does, then it needs to precede the code; if it elaborately clarifies a technical detail about how the code works, then it needs to follow the code.
Luckily, a comment can go either above or below a piece of code, and still leave no doubts about which piece of code it pertains to, by making proper use of blank lines. Of course, programmers who do not pay attention to the use of blank lines will not know what I am talking about; if you are one of those, please skip this answer and move on with your life. But programmers who pay attention to blank lines know very well that blank lines are used to divide code up into logical entities. So, if you see the following:
[blank line]
/* comment */
{ code }
[blank line]
You know that the comment belongs to the code, and that it tells you what the code does. Whereas, if you see the following:
[blank line]
{ code }
/* comment */
[blank line]
Again you know very well that the comment belongs to that code, and it is a clarification about how the code does what it does.