for(int i=0;i<=c;i++)
{
l=0;
if(strcmp(findedge(tst[i],dfa[0][j]),"null")!=0)
{
strcpy(t1,findedge(tst[i],dfa[0][j]));
//l=strlen(temp);
strcat(temp,",");
strcat(temp,t1);
//temp[l+1]='\0';
//temp[l]=',';
}
}
When I try to append comma or some other symbol to temp, a segmentation fault occurs. If that step is omitted everything works perfectly. This is code is from my program to convert NFA to DFA.
You can see that I even tried to manually append the comma without using strcat from those commented lines. Somebody please help me