Sorry but we are not in the business of doing people's homework assignments for them.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
hey,
you have to show that you have actually tried to solve it by submitting the codes you've written... so that someone can help you where you have a knot.... that is how it is done here.
addicted
Junior Poster in Training
57 posts since Mar 2007
Reputation Points: 10
Solved Threads: 0
it would be very useful if you wrapped your text in code ()
Nichito
Posting Virtuoso
1,602 posts since Mar 2007
Reputation Points: 424
Solved Threads: 57
the thing is, in this function you are not concatenating the two strings, you are adding together two pointers, which does not solve the problem. what you must do is create a
char *s3
with the length of the two strings added together, and pass the characters one by one into the pointer...
Got it?
Nichito
Posting Virtuoso
1,602 posts since Mar 2007
Reputation Points: 424
Solved Threads: 57
nope... what i´m saying is that you s1 into s3 in the first cycle with a while loop. Then, without moving the pointer from the position next to the last character you entered in s3, you continue with s2, transferring characters into the rest of the spaces in s3, and in the end s3=='\0' like this:
while (*s1!='\0')
*s3==*s1;
s1++;
s3++;
}
Nichito
Posting Virtuoso
1,602 posts since Mar 2007
Reputation Points: 424
Solved Threads: 57