Email the Author
You can use this page to email Jason Turner about Copy and Reference Puzzlers Book 2.
About the Book
128 FUN Puzzles of Increasing Difficulty Where You Must Ask: Was that a copy, or was it a reference, and who last changed that value?
Book 2 now has `std::swap` puzzles!
Example puzzle:
void run() { char char_1{'t'}; char_1 = 'm'; auto &char_3 = char_1; char_1 = 'u'; char char_5{'o'}; char_1 = 'c'; auto &char_7 = char_3; char char_8{'l'}; auto &char_9 = char_1; char_8 = 'k'; auto &char_11 = char_7; char char_12{'l'}; print("{}{}{}{}{}", char_1, char_12, char_5, char_7, char_8); } // Answer (5): __ __ __ __ __
What is printed?
About the Author
Jason has been using and teaching C++ for over 20 years now. He is host of C++Weekly https://www.youtube.com/c/JasonTurner-lefticus and author of many C++ projects designed to help others learn and explore C++ https://github.com/lefticus/.