Understanding string comparison in C
Ostatnio zmodyfikowano 2017-05-30 18:18
Rashmistrz |
» 2017-05-30 16:46:44 str3 is array and it's modidifiable.
Another copy in memory is needed, because one unchanged version should exist for const char* str1 and const char* str2. If you modify str3 array, const one remains unchanged.
It looks like it's compiler dependent. It even happens with optimization level set as none (-O0). |
|
cnp Temat założony przez niniejszego użytkownika |
» 2017-05-30 18:18:18 Got it. Thanks guys. :) |
|
1 « 2 » |