guys, i'm getting segmentation fault while executing this source code... pls tell me what the problem is.... thanx...
Code:#include<stdio.h> int main() { int len=0,i=0; char *str1 = "Protechsoft"; char *str2="Technologies"; while(*(str1+len) != '\0') len++; while(*(str2+i)!='\0') { *(str1+len)=*(str2+i); len++; i++; } *(str1+len)='\0'; printf("%s",*str1); return 0; }