0

I have three strings:

char str1[] = "My name is John";
char str2 = "My name is John also";
char final [10];

How would i go about comparing the first two strings, and put what is different (" also") into the third one?

4
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by carobee
0

What about other examples?
Is it word-based, or character based?

char str1[] = "My name is John";
char str2[] = "My name also is John";
//
char str1[] = "My name is John";
char str2[] = "Mya namel iss Johno";
0

Character based.
However, I'm only need to check for changes at the end of the string.
I've just realized that I can loop through and check each char, but I'm wondering if there is a built in/easier way?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.