Sure, not a problem. Most programmers do, probably.
However, I've seen students use Stack Overflow and other resources as a source of "program stamps":
- They enter their problem in an Internet search engine.
- Click on the first result with code in it.
- "Stamp it" on their own code: I.e., copy/paste it.
- Using editor/compiler, find any issues by trial and error and fix them so the editor/compiler doesn't complain anymore.
They might try a simple example or two to see if it works. And that's it.
There's not much reflection on their final solution, or on the bits they copy/paste. They don't seem to understand their solution, nor care about that or their problem solving process. They put in effort, they expect a passing grade.