title: string rotations
body: <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  int main()
  {
      char s[15];
      int i,j,n,*str;
  
      printf("Enter a string");
      scanf("%s",str);
      n=strlen(str);
  
      for(i=0;i&lt;n;i++)
      {
          str[n]=str[0];
  
          for(j=0;j&lt;n;j++)
          {
              str[j]=str[j+1];
          }
          str[n]='\0';
          printf("\n %s",str);
      }
      return 0;
  }
  </code></pre>
  
  <p>this program gives me all possible rotations of string</p>
  
  <p>can anyone explain <code>str[n]=str[0]</code> and <code>str[j]=str[j+1]</code> meaning
  instead of taking <code>n=strlen(s)</code> can we use <code>n=strlen(str)</code>
  plz explain</p>