C++ small gotcha

Suppose str1 and str2 points to the same zero terminated string, will str1 and str2 be the same value after running below while loop? while(*str1) { str1++; }; while(*str2++); Answer: Str1 points to the terminating zero of the string. But str2 points to the memory address after the zero. See the assembly of “while(*str2++);” will…

0