Author: Unknown
Subject: strncmp
Date: Friday, 20 Mar 2020, 17:19:29
For strncmp(s1, s2, n), if str1 and str2 are both null terminated and strlen(s1) < n < strlen(s2), does the function compare at most strlen(s1) or n bytes of s1 and s2? Do we need to worry about strncmp accessing memory after null terminator of s1?PREV INDEX NEXT