Possible Duplicate:
Why is this C code causing a segmentation fault?
char array[6] = "kapil";  
array [0] =  'K';    
this code runs ok.
but following code produce segmentation fault ?
char* array = "kapil";  
array [0] =  'K';   
why first does not produce seg-fault.
 
     
     
    