LLMs are great at C, probably because C is historically the most popular language in the world, by far. It only declined slightly very recently. But there's insane amount of code written in it.
But are they "no UB in the code" great? For my use, Opus is absolutely good enough at Rust
You don't need to rely on UB in C code either.
Sure. But any nontrivial C codebase will have UB regardless of your intentions. This has been proven time and time again.