Would I be allowed to make a compilation of all my questions, and the answers they have received, as well as questions answered and their responses from the stack exchange website? I was thinking, this would definitely make for an interesting read, and might even make for a great book, assuming it is allowed. Would I be legally allowed to put this all together into a book and sell it? It would of course list the stack exchange sites that the information resides on.
All (original) Stack Exchange content is licensed with the CC-BY-SA license. In the words of the license:
You are free to
Share — copy and redistribute the material in any medium or format
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
There are a couple restrictions – you have to provide appropriate attribution for the content, and you can't apply a more restrictive license than this one.
Note that this applies to Stack Exchange's original content generally. You are still the copyright holder of your own content, so you aren't legally required to attribute yourself; only the content created by others.
Also, be aware that some content on Stack Exchange is copied from other sources. This includes egregious copyright violations that simply haven't been deleted yet, but more often it's content hosted here under "fair use" provisions of US law. Either way, if any questions or answers that you publish contain quotations or images created by others who have not licensed their content under terms similar to CC-BY-SA, there may be legal consequences for selling that content, depending on your jurisdiction.
For all of your own contributions, you own them. You can do whatever you want with them.
For any contributions that aren't yours, the content uses the CC-by-SA licence, meaning you're free to use it, but it needs to be attributed properly and your derived content needs to have the same licence applied to it (meaning that anyone must be allowed to re-distribute any of the content of your book, so long as it's cited).