Test MDX File V4
This is a Test MDX File for my Code Output setup for Code Cloze and Code Output.
Testing Code Cloze Example.
Section titled “Testing Code Cloze Example.”A component with gaps in the source code and decoy pills. Added a “reset” option when the answers are incorrect as it’s difficult to drag snippets back to the pool.
Complete the Hello World Program
Predicting Program Output
Section titled “Predicting Program Output”These exercises ask you to read a short snippet and choose the terminal output it produces.
Knowledge Check
Section titled “Knowledge Check”Here is a Code Output exercise (C++), expanded by default … example division example. Note the output uses \n to place code on different lines. No syntax highlighting possible.
Integer Division vs. Floating Point
Here is a Code Output exercise (Rust), collapsed by default … The && is a little complex in the closure (pointer to pointer!) for the filter method. The initial code exposed the correct answer automatically when an incorrect answer was chosen. This version tracks incorrect answers.
Iterator Chain Output
Bitwise Lab…
Section titled “Bitwise Lab…”Lab: Bitwise Operations on 8-bit unsigned int (uint8_t)
Click bits on A and B, choose an operation, and the result updates live.
Interactive Memory Lab
Section titled “Interactive Memory Lab”The lab below is pre-loaded with the textbook example: float a = 25.0;,
int b = 545;, and double c = 123.0;. Drag any type from the palette onto
the memory strip to allocate it. Click a placed variable to rename it or
change its value.
C++ Memory Lab
Drag a type onto memory and watch the variable claim the bytes its size demands.
End Tests…
© 2026 Derek Molloy, Dublin City University. All rights reserved.