Ask HN: Am I doing anything illegal by publishing code from a book?
https://news.ycombinator.com/item?id=5504292Finally started going through K&R C using a github repo to save source code from the book. After an interesting chapter, I find it useful to implement the exercise and run it to get a better feel for the language. After publishing a few exercises on my public github repo, I realized that I may be breaking some copyright law. Googling around a bit didn't help. Maybe someone here on HN can help answer the question:
What is the policy on publishing source code from books? Is there a general answer to that question or does it differ with every book? Am I doing anything illegal or immoral by publishing code from a book on my github repo?