Extend the change from commit 9e5bbb69ea (Tutorial: Add captions for code blocks, 2021-06-11) to also add a Sphinx named target to code blocks. Name each target after the change the code block makes.
9e5bbb69ea
- Use inline literals for all code fragments and names. - Add missing console code-blocks. - Always use c++, not c as code language.
Fixes: #21737