This service has been designed to try out small self-contained C examples online (in a manner reminiscent of Compiler Explorer):
https://taas.trust-in-soft.com/tsnippet/
One advantage is that it identifies a LOT of undefined behaviors during execution for which traditional compilation and execution only give puzzling results.
One drawback is that some of the undefined behaviors it identifies are obscure, and for others the message may be unusual. For instance, using a standard function without including the appropriate header may result in a warning about the mismatch between the type in the header and the type of the arguments the standard function was applied to after arguments promotions.
Overall, you may still find it useful for teaching.