0

How do you cite a Stack Overflow answer? Let's say I want to copy and paste a code solution that someone provided for a question asked on Stack Overflow, how do you cite that in a programming textbook for example? Is there a format that's widely used? I am thinking of including the code within a Figure, image or just between code brackets within a textbook. Also, should you try to check and see if the person who gave the answer copied the code from another source, or is it ok to just assume the person wrote the code himself?

1
  • "Also, should you try to check and see if the person who gave the answer copied the code from another source, or is it ok to just assume the person wrote the code himself?" – You cannot check that. The person who gave the answer might have copied the code from a source that is not available to you (e.g. from some source code or a book or what a teacher wrote on a blackboard).
    – user55858
    Commented Mar 11, 2023 at 14:48

1 Answer 1

1

In APA format:

Sayaman (2023, March 11). How do you cite a Stack Overflow answer? Writing StackExchange. https:// writing.stackexchange.com/q/65776/55858

(I had to add a space inside the URL so the site software doesn't replace it with the question title. In your citation, do not add spaces to the URL.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.