Deepikak
asked on
strcat() -- segmentation fault Core Dumping
the destination string doesn't have enough memory (space) allocated to it..
complete strcat example:
char *buffer;
buffer = (char*) malloc(1024);
memset(buffer, 0, 1024);
strcat(buffer, "initial strcat\n");
strcat(buffer, "another strcat\n");
char *buffer;
buffer = (char*) malloc(1024);
memset(buffer, 0, 1024);
strcat(buffer, "initial strcat\n");
strcat(buffer, "another strcat\n");
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Nothing has happened on this question in over 9 months. It's time for cleanup!
My recommendation, which I will post in the Cleanup topic area, is to
accept answer by plushey (even though it was late it was most comprehensive).
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
jmcg
EE Cleanup Volunteer
My recommendation, which I will post in the Cleanup topic area, is to
accept answer by plushey (even though it was late it was most comprehensive).
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
jmcg
EE Cleanup Volunteer