Multiple choice technology programming languages

Can we change the content of string letral?

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

String literals are stored in read-only memory and attempting to modify them results in undefined behavior (typically a segmentation fault). They should be treated as immutable constants. To modify strings, use character arrays or string manipulation functions that create new string objects.