skip to content

Arrays and Strings

0 questions

Arrays decay to pointers, so a function never knows how long one is, and strings are just bytes ended by a NUL you have to keep track of yourself. Interviewers ask about strcpy versus strncpy and off-by-one terminator errors because that is precisely where buffer overflows come from.

questions

0 questions