I took a CS course some time ago in C. The instructor told us that it was perfectly okay to get help from another student on the assignment, because of how he constructed the exams: He would give you one additional feature to add to the program in class, and you had until the end of class to complete it. That way he would know if you really knew what you were doing, or whether you really copied someone else's work.
I helped another student with some of the assignments, including the last one. I knew what I was doing, they didn't. I went to check my grades a couple of weeks after the end of the semester, and there was a notification to come into the departmental office. It seems that the final assignment I turned in was very similar to another student's. My implementation of the final project was clean and quick, and adding the final feature took all of about 5 minutes. I said that the other student had cheated off of me, and I knew what I was doing: they didn't. Unfortunately, the other student had left town, already having a BS from another university (not in CS). This was a community college. The teacher himself never confronted me or made any comments that what was going on wasn't okay. In fact, he had specifically stated in class that it was okay, but the department chair said that he was 'on vacation, so unavailable'. I was furious, and fought it, but lost. I got an F on the final project, and my grade in the class was lowered an additional letter. It's been more than 10 years, and it still makes my blood boil.
I was talking to a friend who still lives in the same town recently and he told me that he has now heard this story 7 times from 7 different people who all had the same thing happen: no comments were made during the semester, and so while the teacher was on summer break, they had cheating charges leveled against them. It was the same teacher. His name is Scott Badman. He taught at Parkland Community College in Champaign, IL, and I think he's now finally retired.
So, did I cheat?