Namespaces
Variants
Actions

Talk:c/string/byte/strncmp

From cppreference.com

[edit] undefined behavior

I am attempting to simplify the sentence about undefined behavior. Is the "not" of "pointers to possibly null-terminated array" simply the null pointer? May that sentence read, "The behavior is undefined if either lhs or rhs is the null pointer." Newatthis (talk) 06:44, 17 August 2015 (PDT)

that would be even more incomplete that it is now. char a[2]={'a','b'}; char b[2]={'c','d'}; strncmp(a, b, 100); is undefined due to access past the end of array --Cubbi (talk)
How about now? Newatthis (talk) 04:41, 18 August 2015 (PDT)