Is there a lightweight way to test C code on Android? I want to write and run small general purpose C code snippets on my Android phone. These will primarily be data structures and algorithm implementations. Is there a lightweight  and quick way to do so?
It might be worth a try to install Android IDE (AIDE) - to quote a brief summary:

AIDE is an integrated development environment (IDE) for developing
real Android Apps directly on Android devices. AIDE supports the full
edit-compile-run cycle

However, typing on a device might make it cumbersome unless its a tablet form factor with bluetooth keyboard attached to save the pain in typing.
Edit
As per @Izzy's comment below, Terminal IDE is another such app, this one points to Google Play Store, however I got a 500 error trying to access the page below within the comment! Cheers for that \o/