Possible Duplicate:
What is the difference between char s[] and char *s in C?
There's a program:
#include<stdio.h>
int main()
{
    char str[20] = "Hello";
    char *const p=str;
    *p='M';
    printf("%s\n", str);
    return 0;
}
This prints Mello as the answer.. But since p is a constant pointer, shouldn't it give an error?
 
     
     
     
     
    