You can compensate for C's lack of compile time protections with run-time tools like valgrind [1] and the various sanitizers in clang [2, 3].
1: http://valgrind.org/
2: https://clang.llvm.org/docs/AddressSanitizer.html
3: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
You can compensate for C's lack of compile time protections with run-time tools like valgrind [1] and the various sanitizers in clang [2, 3].
1: http://valgrind.org/
2: https://clang.llvm.org/docs/AddressSanitizer.html
3: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html