difference between a character array and a character pointer.
char *cp = “Hello world”;//Character pointer
//will place Hello world in the read-only parts of the memory
//and making cp a pointer to that, making any writing operation on this memory illegal. While doing:
//*(cp+1)=‘a’; is runtime error
char s = "Hello world";//array of characters //puts the literal string in read-only memory and copies the string to newly allocated memory on the stack. //Making s = 'J';//correct printf("%s",s); getch(); }