Despite legends and Hollywood tropes, there’s no historical evidence that European castles stocked their moats with crocodiles. Moats were typically filled with water (or left dry) as a physical barrier; introducing large, dangerous reptiles would have been impractical, expensive, and hazardous to the garrison.
Crocodiles appear in medieval bestiaries as exotic curiosities, but they were never a standard defensive feature.