<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mreric.org/index.php?action=history&amp;feed=atom&amp;title=C_Language_Practice%3A_String_Compare</id>
	<title>C Language Practice: String Compare - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mreric.org/index.php?action=history&amp;feed=atom&amp;title=C_Language_Practice%3A_String_Compare"/>
	<link rel="alternate" type="text/html" href="https://wiki.mreric.org/index.php?title=C_Language_Practice:_String_Compare&amp;action=history"/>
	<updated>2026-11-11T00:18:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.mreric.org/index.php?title=C_Language_Practice:_String_Compare&amp;diff=64&amp;oldid=prev</id>
		<title>Eric: Created page with &quot;== Compare: If one string happens to match another string ==  * Step 1: Get a string compare function * Step 2: Call it and print it  &lt;syntaxhighlight lang=&quot;c&quot; line style=&quot;border: 1px dashed red;&quot;&gt;  #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;string.h&gt;  int strcheck(char *str, char *check) {     int ftime;     int i, j;     for (i = 0; str[i] != &#039;\0&#039;; i++)     {         for(j = 0; check[j] != &#039;\0&#039;; j++)         {             if (check[j] == str[i])             {...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.mreric.org/index.php?title=C_Language_Practice:_String_Compare&amp;diff=64&amp;oldid=prev"/>
		<updated>2022-03-12T09:32:06Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Compare: If one string happens to match another string ==  * Step 1: Get a string compare function * Step 2: Call it and print it  &amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line style=&amp;quot;border: 1px dashed red;&amp;quot;&amp;gt;  #include &amp;lt;stdio.h&amp;gt; #include &amp;lt;stdlib.h&amp;gt; #include &amp;lt;string.h&amp;gt;  int strcheck(char *str, char *check) {     int ftime;     int i, j;     for (i = 0; str[i] != &amp;#039;\0&amp;#039;; i++)     {         for(j = 0; check[j] != &amp;#039;\0&amp;#039;; j++)         {             if (check[j] == str[i])             {...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Compare: If one string happens to match another string ==&lt;br /&gt;
&lt;br /&gt;
* Step 1: Get a string compare function&lt;br /&gt;
* Step 2: Call it and print it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; line style=&amp;quot;border: 1px dashed red;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int strcheck(char *str, char *check)&lt;br /&gt;
{&lt;br /&gt;
    int ftime;&lt;br /&gt;
    int i, j;&lt;br /&gt;
    for (i = 0; str[i] != &amp;#039;\0&amp;#039;; i++)&lt;br /&gt;
    {&lt;br /&gt;
        for(j = 0; check[j] != &amp;#039;\0&amp;#039;; j++)&lt;br /&gt;
        {&lt;br /&gt;
            if (check[j] == str[i])&lt;br /&gt;
            {&lt;br /&gt;
                printf(&amp;quot;yes, &amp;quot;);&lt;br /&gt;
                return i += 1;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;strings do not match\n&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main(void)&lt;br /&gt;
{&lt;br /&gt;
    char str[25];&lt;br /&gt;
    printf(&amp;quot;please enter a string: &amp;quot;);&lt;br /&gt;
    scanf(&amp;quot;%s&amp;quot;, str);&lt;br /&gt;
    char check[25];&lt;br /&gt;
    printf(&amp;quot;please enter another string: &amp;quot;);&lt;br /&gt;
    scanf(&amp;quot;%s&amp;quot;, check);&lt;br /&gt;
&lt;br /&gt;
    printf(&amp;quot;%d\n&amp;quot;, strcheck(str, check));&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eric</name></author>
	</entry>
</feed>