Ask your own question, for FREE!
Computer Science 20 Online
OpenStudy (anonymous):

"String is immutable" Can any one Explain in context of C or C++ plz i m higly confused

OpenStudy (anonymous):

no one ... @preetha :(

OpenStudy (rsmith6559):

Immutable is unchangeable. In C, C++ and Java it would probably be declared const.

OpenStudy (anonymous):

Consider the function: int main() { //.. string str = "Hello World"; newFunc(str); //... } int newFunc( string &parameter const) { //... //Since this is passed by reference you can access string directly but you cannot mutate it //... }

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!