Unless specifically tagged otherwise, everything in this repository is authored by me (Joe Zbiciak, [email protected]), and is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license, aka. CC BY-SA 4.0.
Quora receives an endless stream of homework questions, including programming homework questions. At some point, I decided to start answering these homework questions with technically correct answers (the best kind of correct!) that nonetheless aren't useful as homework assignment answers.
Click through the code in this repository to get a taste. Most of this code is in C or C++. You might find the occasional assembly language, however.
-
Print 1 to 100 without a loop or recursion seems to be where it all truly started. I had some snarky homework answers before that, but this is likely where I first crossed the line.
-
Sum of even numbers between 1 and 100 using
goto
This request truly woke the homework trolling Sith in me, I think. The previous answer was just an incident that hinted as what was to come. -
The Quickies contain a lot of short answers to a wide variety of questions.
- How does passing an array as an argument to a function differ from call by value?
- In C, how do I convert between a character pointer and a character array?
- What is some non-obfuscated Perl code that does something unexpected?
The code here may not be exactly as it appears on Quora. Quora has decreased the effective width of code blocks over the years to the point that I often only have ~30 characters of width to work with. Here, I allow myself a full 80 columns to work with.
As of January 2023, I've written over 5400 Quora answers. I've spent a few weeks going through my history, cataloging most of my creative programming homework answers here.
Also, I haven't included every such answer. Some are better than others, and a few were left on the cutting room floor.
Also check out:
Copyright © 2023, Joe Zbiciak [email protected]
SPDX-License-Identifier: CC-BY-SA-4.0