Basic question.
char new_str[]=\"\";
char * newstr;
If I have to concatenate some data into it or use string functions like strcat/substr/
char new_str[]="abcd";
This specifies an array of characters (a string) of size 5 bytes (one byte for each character plus one for the null terminator). So it stores the string 'abcd' in memory and we can access this string using the variable new_str.
char *new_str="abcd";
This specifies a string 'abcd' is stored somewhere in the memory and the pointer new_str points to the first character of that string.
Please go through this article below:
Also see in case of array of char like in your case, char new_str[] then the new_str will always point to the base of the array. The pointer in itself can't be incremented. Yes you can use subscripts to access the next char in array eg: new_str[3]
;
But in case of pointer to char, the pointer can be incremented new_str++
to fetch you the next character in the array.
Also I would suggest this article for more clarity.
The difference is that one is a pointer, the other is an array. You can, for instance, sizeof() array. You may be interested in peeking here