title: Getting Segmentation Fault in String Manipulation
body: <p>Here i give input string like this <code>"/org/bluez/1509/hci0"</code></p>
  
  <p>And i want output like this <code>/org/bluez/1509/hci0</code></p>
  
  <p>Here i use this method but i got Segmentation fault. </p>
  
  <pre><code>void main () 
  {
      char  *str = "\"/org/bluez/1509/hci0\"";
      int len = strlen(str);
      printf("\nlength %d\n",len);
     char *str1;
     str1 = str+1;
     printf("String 1 = %s\n",str1);
     *(str1+ (strlen(str)-2)) = '\0'; 
     printf("\nString 1 = %s\n",str1);
  }
  </code></pre>
  
  <p>I am getting output like this</p>
  
  <pre><code>length 22
  String 1 = /org/bluez/1509/hci0"
  Segmentation fault
  </code></pre>
  
  <p>Problem with Last " character.</p>
  
  <p>Can Any body Help me or Suggest me new Way.?</p>