title: Given a string Opentext print Open1ex2 i.e replace t's in the string with the count of t
body: <pre><code>#include&lt;stdio.h&gt;
  void main()
  {
    char str[]="OpenText";
    int i=0,strlen,count=0;
    while(str[i]!='\0')
      i++;
    strlen=i;
  
    for(i=0;i&lt;strlen;i++)
    {
       if(str[i]=='T' || str[i]=='t')
       {
         count++;
         str[i]=count;
       }
    }
    printf("%s",str);
  }
  </code></pre>
  
  <p>I got output :Openex</p>
  
  <p>I am not getting the desired output, please help me out.</p>
  
  <p>I want to get Open1ex2 as output i.e  for the given a string Opentext I want to get  Open1ex2 as output i.e replace t's in the string with the count of t</p>