Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
What happens here?
char *s = "Mike";s[0] = 'J';
Code is working fine, but memory analyzer program (like valgrind) will print warning
Compile-time error
Undefined behavior (modifying string literal)
Works fine, s becomes "Jike"
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!