Null terminator..

Hi.. Null terminator is good but not that good..

When I am using null terminator I can't make the original one back to it's original form..

Example: char text1[14] = "ILOVETHISGAME"; text1[5] = '\0'; char *c_array = &text1[0];

It is working..but I want the first variable which is text1 to be back to normal to use it for other things..

You've overwritten part of the string. If you want the original string back, you have to save the character before you overwrite it, or copy the string elsewhere.

Then you need to copy the original before you mutate it. Something like:

const char text1[] = "ILOVETHISGAME";
char text2[sizeof(text1)/sizeof(text1[0])];
strcpy(text2, text1);
text2[5] = '\0';
const char *c_array = &text1[0];

This is what I like about arduino forum.. You guys are good.. fast reply. Thank you :D