I have a string called that can continue a value with spaces for it as an example
char *a="this is a test"
You did not really "declare" a string. With
char *a="this is a test";
you assigned a literal string to a character pointer. With:
char *b=NULL; b=a;
you assigned what
a points to
b, so you still have only one string (literal). Note that string literals generally reside in read-only memory and cannot be modified. What you could do is:
char a="this is a test"; char b; strcpy(b,a);
Now you have two strings and can manipulate each independently.