title: Compare string array with a single string entered by user , it also tell that it is found 2times &at that position
body: <pre><code>#include&lt;iostream.h&gt;
  #include&lt;conio.h&gt;
  #include&lt;string.h&gt;
  
  void main()
  {
      clrscr();
  
      char str[3][10], search[10];
      int i, t = 0, k;
  
      cout &lt;&lt; "Enter 3 Names Of Fruit" &lt;&lt; endl;
  
      for (i = 0; i &lt; 3; i++)
          cin &gt;&gt; str[i];
  
      cout &lt;&lt; "Enter Fruit Name To Search" &lt;&lt; endl;
      cin &gt;&gt; search;
  
      for (i = 0; i &lt; 3; i++)
      {
          if (search == str[i])   // if statement is not giving true
          {
              t++;
              k = i;
          }
      }
  
      cout &lt;&lt; "The " &lt;&lt; search &lt;&lt; " is found " &lt;&lt; t &lt;&lt;
          " times and is at position " &lt;&lt; k &lt;&lt; endl;
  
      getch();
  }
  </code></pre>