I was recently asked in the following question in an interview: "What are all the possible ways to achieve memory safety while writing C code?"
I replied about secure versions of APIs. The interviewer said that there are more approaches than that. I want to ask what is the list of ways to achieve memory safety.