逛stackoverflow无意发现的,很常见的错误,自己就曾迷糊过,你是否也曾犯过?:-)
Can anybody tell me difference between the bellow statements?
ANS:When you declare char p[] you are declaring an array of chars (which is accessible to be both read and written), and this array
is initialized to some sequence of characters i.e. "This is test" is copied to the elements in this array.
When you declare char* p, you are declaring a pointer that points directly to some constant literal - not a copy. These can only
be read.